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

Differentiate between the expression “++a” and “a++”?

0 Answers  


Are global variables static in c?

0 Answers  


Explain about C function prototype?

0 Answers  


Do you have any idea how to compare array with pointer in c?

0 Answers  


How to create struct variables?

0 Answers  


How do you view the path?

0 Answers  


what defference between c and c++ ?

6 Answers  


int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?

4 Answers   TCS,


How can I convert integers to binary or hexadecimal?

2 Answers  


A program to allow an input operand and operator from the operator and read on the display and output operand.

0 Answers  


What does. int *x[](); means ?

0 Answers   Wilco,


write a own function for strstr

1 Answers   LG Soft,


Categories