main()

{

int i;

printf("%d",scanf("%d",&i)); // value 10 is given as
input here

}

Answers were Sorted based on User's Feedback



main() { int i; printf("%d",scanf("%d",&i)); // ..

Answer / susie

Answer :

1

Explanation:

Scanf returns number of items successfully read and not 1/0.
Here 10 is given as input which should have been scanned
successfully. So number of items read is 1.

Is This Answer Correct ?    24 Yes 1 No

main() { int i; printf("%d",scanf("%d",&i)); // ..

Answer / keerthi

1

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More C Code Interview Questions

Derive expression for converting RGB color parameters to HSV values

1 Answers  


main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4

2 Answers   HCL,


what is the code of the output of print the 10 fibonacci number series

2 Answers  


Develop a routine to reflect an object about an arbitrarily selected plane

0 Answers  


#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }

3 Answers  






main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }

2 Answers  


How to read a directory in a C program?

4 Answers  


#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }

1 Answers  


void main() { int i; char a[]="\0"; if(printf("%s\n",a)) printf("Ok here \n"); else printf("Forget it\n"); }

3 Answers   Accenture,


could you please send the program code for multiplying sparse matrix in c????

0 Answers  


program to find magic aquare using array

4 Answers   HCL,


How can I Create a C program in splitting set of characters to specific subsets. Example: INPUT SET OF CHARACTERS: Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain. SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10 OUTPUT: Therefore, my dear b rothers an d sisters, stand fir m. Let not hing move you. Alway s give you rselves fu lly to the work of t he Lord, b ecause you know that your labo r in the L ord is not in vain.

0 Answers  


Categories