void main()
{
int x,y=2,z;
z=(z*=2)+(x=y=z);
printf("%d",z);
}
Answers were Sorted based on User's Feedback
Answer / sanjay bk
8400,8521, when you run program then program giving output is different different answer.
| Is This Answer Correct ? | 2 Yes | 2 No |
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above
4 Answers Corporate Society, HCL,
main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }
void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(“%d”, i); }
given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit
#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"); }
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
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.
main() { clrscr(); } clrscr();
# include <stdio.h> int one_d[]={1,2,3}; main() { int *ptr; ptr=one_d; ptr+=3; printf("%d",*ptr); }
what is variable length argument list?
Is it possible to type a name in command line without ant quotes?