Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

find largest element in array w/o using sorting techniques.

3 Answers   Zycus Infotech,


64/square(4)

1 Answers  


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

0 Answers  


can we declare a function in side the structure?

2 Answers   HCL,


Write a program to give following output..... ********* **** **** *** *** ** ** * * ** ** *** *** **** **** *********

4 Answers  


What is difference between structure and union in c?

0 Answers  


Which header file is used for clrscr?

0 Answers  


Why the below program throughs error during compilation? #include<stdio.h> #include<conio.h> enum { ZERO, ONE, TWO, }; main() { printf("%d",&TWO); getch(); }

2 Answers  


Describe wild pointers in c?

0 Answers  


Do pointers need to be initialized?

0 Answers  


How to reverse a linked list

1 Answers   Aricent, Fidelity, IBM, TCS,


What is pass by value in c?

0 Answers  


Categories