C++ :: How To Use Puts And Gets

Jun 3, 2013

I have already used puts and gets in C but now i am working on a program where i have asked a user to enter name for 5 times in a loop . Now want to print the names ... How to print their full names using C++ ?

View 1 Replies


ADVERTISEMENT

C :: Puts Does Not Work For A String

Dec 31, 2014

puts(pd) does not give any output in the below code. Also, the first puts(ps) does give an output, but the second puts(ps) after "while" does not give any output.

Code:

#include <stdio.h>
int main()
{
char source[50]="Alice has apples.";
char destination[60];
char *pd, *ps;
}

[code].....

View 1 Replies View Related

C++ :: For Loop - Code Puts Out Switch Statement 5 Times With Random Number

Jan 26, 2014

I am writing for loop with a switch so that scores can be inputted in by a judge. The issue that I am running into is that I will put out an the text then the test happens and the code puts out the switch statement 5 times with random number. Here is what I have written.

Code:
int main() {
int diver;
int option;
int Judge;
cout << "Enter Divers Name:";

[Code] ....

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved