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 |
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)); }
how to return a multiple value from a function?
write a c program to print magic square of order n when n>3 and n is odd?
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
Write, efficient code for extracting unique elements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9) -> (1, 3, 5, 9).
13 Answers Intel, Microsoft, TCS,
write a c-program to find gcd using recursive functions
programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h
How do you sort a Linked List (singly connected) in O(n) please mail to pawan.10k@gmail.com if u can find an anser...i m desperate to knw...
6 Answers Microsoft, MSD, Oracle,
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
Write a C function to search a number in the given list of numbers. donot use printf and scanf
To reverse an entire text file into another text file.... get d file names in cmd line