main()
{
int i;
printf("%d", &i)+1;
scanf("%d", i)-1;
}



main() { int i; printf("%d", &i)+1; scanf("%d", i)-1; } ..

Answer / abhishek marshetty

Explanation: printf( ) prints address/garbage of i, scanf() dont have & sign, so scans address for i +1, -1 dont have any effect on code.

Is This Answer Correct ?    11 Yes 0 No

Post New Answer

More C Interview Questions

Difference between C and Embedded C?

1 Answers  


struct abc { unsigned int a; char b; float r; }; struct xyz { int u; struct abc tt; }ww; ww = (struct xyz*)malloc(sizeof(struct xyz)); will the memory be allocated for the inner structure also?

1 Answers   Wipro,


How can I implement sets or arrays of bits?

0 Answers  


How to delete a node from linked list w/o using collectons?

0 Answers   Zycus Infotech,


write a program to concatenation the string using switch case?

0 Answers  






What's the difference between calloc() and malloc()?

4 Answers  


How do you determine a file’s attributes?

0 Answers  


how to generate sparse matrix in c

3 Answers  


What is the data segment that is followed by c?

0 Answers  


Tell us the use of fflush() function in c language?

0 Answers  


What is a MAC Address?

0 Answers  


Write a program that receives as input a number omaadel-n-print, four digits.

0 Answers  


Categories