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

What are the different types of data structures in c?

0 Answers  


How to calculate Total working time using Login and logout?

2 Answers   CTS, Cygnus, Infosys, Signal Networks, TCS, Wipro,


What is an example of enumeration?

1 Answers  


GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

0 Answers  


What is the difference between typeof(foo) and myFoo.GetType()?

2 Answers   Synergy,


what is the output for the code : main() { int i,j; printf("%d %d ",scanf("%d%d",&i,&j)); }

20 Answers   Infosys,


main() { int age; float ht; printf("Enter height and age"); scanf("%d%d",&height,&age); if((age<=20)&&(ht>=5)) {printf("She loves you");} else {printf("She loves you");} }

2 Answers  


What are nested functions in c?

0 Answers  


Does sprintf put null character?

0 Answers  


how would a 4*3 array A[4][3] stored in Row Major Order?

0 Answers   HCL, Ignou,


What are structure types in C?

0 Answers  


How can you increase the size of a dynamically allocated array?

0 Answers   TISL,


Categories