void main()
{
char a[]="12345\0";
int i=strlen(a);
printf("here in 3 %d\n",++i);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
here in 3 6
Explanation:
The char array 'a' will hold the initialized string, whose
length will be counted from 0 till the null character. Hence
the 'I' will hold the value equal to 5, after the
pre-increment in the printf statement, the 6 will be printed.
| Is This Answer Correct ? | 18 Yes | 4 No |
Answer / ravneet kaur
as this is a character array and would have string in double
quotes so this code shows an error i.e. *char wont changes
to *int.
| Is This Answer Correct ? | 0 Yes | 5 No |
main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }
Develop a routine to reflect an object about an arbitrarily selected plane
main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }
struct aaa{ struct aaa *prev; int i; struct aaa *next; }; main() { struct aaa abc,def,ghi,jkl; int x=100; abc.i=0;abc.prev=&jkl; abc.next=&def; def.i=1;def.prev=&abc;def.next=&ghi; ghi.i=2;ghi.prev=&def; ghi.next=&jkl; jkl.i=3;jkl.prev=&ghi;jkl.next=&abc; x=abc.next->next->prev->next->i; printf("%d",x); }
what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }
void main() { int i=5; printf("%d",i+++++i); }
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
main() { int i = 3; for (;i++=0;) printf(“%d”,i); }
What are segment and offset addresses?