+ 2
My program is correct or not confused because in computer programs display differently than in it should i have to use scanf ?
Name of student: Father 's name: Mother 's name: Name of course: Semester: Name of college: https://code.sololearn.com/c5c5QFp9Tgeo/?ref=app
9 Respuestas
+ 10
So do you want to ask user from input or just want to print each field on clicking enter ???
If you want user input then use scanf as it will ask for one field then you have to click enter. Then it will ask next field, click enter and so on.
If you want to just display the details on clicking enter, then use getch () function after every printf staement. Use the header file conio.h with it.
Note : this will work in your pc but not in the Sololearn compiler.
+ 10
And you have also not written any value in the printf. If you want to display the values then write some values in the printf statement
+ 7
Lata Mishra I think in pc and here both places the output of your code will be same because its only print statements which you have used in the program
+ 7
What you want to do in above program
+ 1
There is any error in this program or logic mistake please help to solve
+ 1
Ok thanks
0
My question is i have to
write a program to display the following :
NAME OF STUDENT:
FATHERS NAME:
MOTHERS NAME:
AGE OF STUDENT:
NAME OF COURSE:
SEMESTER:
NAME OF COLLEGE:
Which i actually did but confused that it will ask me to answer the following data or not for example:-
NAME OF STUDENT:rohan than when i press enter than it will ask next question for example:- FATHERS NAME:sohan and so on..
so program is correct to implement this data.
0
You need to define variables to store your input at the top of the program. Easiest way would be lines like
char name_of_student[100];
After each prompt add a line to accept input using the fgets() function:
fgets(name_of_student, 100, stdin);
At the end of your program print all your variables:
printf("NAME OF STUDENT: %s\n", name_of_student);
0
Please solve it whatever i did because i am frustrated doing this code or explain line by line about my mistake