will the program compile? int i; scanf(“%d”,i); printf(“%d”,i);
Answers were Sorted based on User's Feedback
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 |
Answer / girish
it gives the garbage value of that perticular element.
| Is This Answer Correct ? | 4 Yes | 1 No |
What are the different types of data structures in c?
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?
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
What is the difference between typeof(foo) and myFoo.GetType()?
what is the output for the code : main() { int i,j; printf("%d %d ",scanf("%d%d",&i,&j)); }
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");} }
What are nested functions in c?
Does sprintf put null character?
how would a 4*3 array A[4][3] stored in Row Major Order?
What are structure types in C?
How can you increase the size of a dynamically allocated array?