main()
{
while (strcmp(“some”,”some\0”))
printf(“Strings are not equal\n”);
}
Answer / susie
Answer :
No output
Explanation:
Ending the string constant with \0 explicitly makes no
difference. So “some” and “some\0” are equivalent. So,
strcmp returns 0 (false) hence breaking out of the while loop.
| Is This Answer Correct ? | 3 Yes | 0 No |
can u give me the c codings for converting a string into the hexa decimal form......
Write a routine to implement the polymarker function
void main() { unsigned giveit=-1; int gotit; printf("%u ",++giveit); printf("%u \n",gotit=--giveit); }
#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d----%d",*p,*q); }
main() { if (!(1&&0)) { 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
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
#define assert(cond) if(!(cond)) \ (fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\ __FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); }
what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);
what is oop?
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }