main()
{
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
Behavior is implementation dependent.
Explanation:
The detail if the char is signed/unsigned by default
is implementation dependent. If the implementation treats
the char to be signed by default the program will print ā128
and terminate. On the other hand if it considers char to be
unsigned by default, it goes to infinite loop.
Rule:
You can write programs that have implementation
dependent behavior. But dont write programs that depend on
such behavior.
Is This Answer Correct ? | 5 Yes | 2 No |
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
Write a c program to search an element in an array using recursion
main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }
main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\nā", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above
can u give me the c codings for converting a string into the hexa decimal form......
main() { int (*functable[2])(char *format, ...) ={printf, scanf}; int i = 100; (*functable[0])("%d", i); (*functable[1])("%d", i); (*functable[1])("%d", i); (*functable[0])("%d", &i); } a. 100, Runtime error. b. 100, Random number, Random number, Random number. c. Compile error d. 100, Random number
Is the following code legal? struct a { int x; struct a *b; }
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
main() { int a[10]; printf("%d",*a+1-*a+3); }
void main() { int i=5; printf("%d",i++ + ++i); }