What is the problem with the following code segment?
while ((fgets(receiving array,50,file_ptr)) != EOF)
;
Answer / susie
Answer : & Explanation:
fgets returns a pointer. So the correct end of file check is
checking for != NULL.
| Is This Answer Correct ? | 6 Yes | 1 No |
prog. to produce 1 2 3 4 5 6 7 8 9 10
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }
Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.
Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.
plz send me all data structure related programs
how to return a multiple value from a function?
main() { show(); } void show() { printf("I'm the greatest"); }
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above
void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(“%d”, i); }
#include<stdio.h> int main() { int a=3,post,pre; post= a++ * a++ * a++; a=3; pre= ++a * ++a * ++a; printf("post=%d pre=%d",post,pre); return 0; }
create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
9 Answers CSC, GoDB Tech, IBM,