main()
{
unsigned int i=10;
while(i-->=0)
printf("%u ",i);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
10 9 8 7 6 5 4 3 2 1 0 65535 65534…..
Explanation:
Since i is an unsigned integer it can never become negative.
So the expression i-- >=0 will always be true, leading to
an infinite loop.
Is This Answer Correct ? | 25 Yes | 5 No |
Printf can be implemented by using __________ list.
main() { char c=' ',x,convert(z); getc(c); if((c>='a') && (c<='z')) x=convert(c); printf("%c",x); } convert(z) { return z-32; }
main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
In the following pgm add a stmt in the function fun such that the address of 'a' gets stored in 'j'. main(){ int * j; void fun(int **); fun(&j); } void fun(int **k) { int a =0; /* add a stmt here*/ }
write a c program to Reverse a given string using string function and also without string function
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
void main() { int k=ret(sizeof(float)); printf("\n here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }