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

input may any number except 1,output will always 1.. conditions only one variable should be declare,don't use operators,expressions,array,structure

4 Answers   IBM,


What is the mean of function?

0 Answers  


diff between exptected result and requirement?

0 Answers   HCL,


what do you mean by enumeration constant?

0 Answers  


I have a varargs function which accepts a float parameter?

0 Answers  






Can you write the algorithm for Queue?

0 Answers   College School Exams Tests, TCS,


Define function ?Explain about arguments?

2 Answers   Geometric Software, Infosys,


How do we select the big element or any other operation from array which is read dynamically. user need to give the elements only no need to mention the size.

0 Answers  


Can anyone help me with this please? Need to print the below values.. Thanks 1 1 2 1 2 3 1 2 3 4

3 Answers  


Why doesnt that code work?

0 Answers  


What are different storage class specifiers in c?

0 Answers  


What is pass by reference in functions?

0 Answers  


Categories