|
|
INTERVIEW QUESTIONS
LANGUAGES
C DETAILS
Question :
main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%dn?", x--); } }
|
|
|
Related Questions |
View Answer |
 |
main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); }
|
View Answer |
 |
void main () { int x = 10; printf ("x = %d, y = %d", x,--x++); }
|
View Answer |
 |
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); }
|
View Answer |
 |
main() { int c = 5; printf("%d", main||c); }
|
View Answer |
 |
main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); }
|
View Answer |
 |
main() { printf("%d, %d", sizeof('c'), sizeof(100)); }
|
View Answer |
 |
void func1(int (*a)[10]) { printf("Ok it works"); } void func2(int a[][10]) { printf("Will this work?"); }
main() { int a[10][10]; func1(a); func2(a); }
|
View Answer |
 |
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); }
|
View Answer |
 |
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); }
|
View Answer |
 |
struct Foo { char *pName; char *pAddress; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); obj->pName = malloc(100); obj->pAddress = malloc(100); strcpy(obj->pName,"Your Name"); strcpy(obj->pAddress, "Your Address"); free(obj); printf("%s", obj->pName); printf("%s", obj->pAddress); }
|
View Answer |
Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.
| Notify me when better answer is posted!
|
View ALL C Interview Questions
|
|
|