Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

will the program compile? int i; scanf(“%d”,i); printf(“%d”,i);

Answers were Sorted based on User's Feedback

will the program compile? int i; scanf(“%d”,i); printf(“%d”,i);..

Answer / vignesh1988i

surely it will compile and run , no problem will be in
it.... but the problem lies in ur scanf statement , there
what ever u have typed as an input number , that number
wont be stored in 'i' since you have left ur '&'(reference
operator) , so ur compiler dosen't know where to store ur
input value....... so it will print some garbage value in
the printf().........

thank u

Is This Answer Correct ?    17 Yes 0 No

will the program compile? int i; scanf(“%d”,i); printf(“%d”,i);..

Answer / girish

it gives the garbage value of that perticular element.

Is This Answer Correct ?    4 Yes 1 No

will the program compile? int i; scanf(“%d”,i); printf(“%d”,i);..

Answer / raghav

it showing the null pointer assignment

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Is c easy to learn?

0 Answers  

i want to asked a question about c program the question is: create a c program that displays all prime numbers less than 500? using looping statement

5 Answers  

Why cd or dvd are round why not square.

1 Answers  

Input any no. and print all the the numbers that comes before it like this for e.g input = 4 0 01 012 0123 01234 plz answer it 2day

3 Answers  

1. Can we use the for loop this way? for(;i>5;) 2. What is the use of pointers? 3. what is array of pointer? 4. What is the difference between file and database? 5. Define data structure?

1 Answers a=10; b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

0 Answers  

Explain how do I determine whether a character is numeric, alphabetic, and so on?

0 Answers  

Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4

2 Answers   Mascot,

What does 1f stand for?

0 Answers  

What is the data segment that is followed by c?

0 Answers  

diff between exptected result and requirement?

0 Answers   HCL,

write a c program to calculate sum of digits till it reduces to a single digit using recursion

0 Answers   IBM,