main()
{
int i;
printf("%d",scanf("%d",&i)); // value 10 is given as
input here
}
Answers were Sorted based on User's Feedback
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 argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above
create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"
What is the hidden bug with the following statement? assert(val++ != 0);
given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit
Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.
5 Answers IITR, Microsoft, Nike,
why array index always strats wuth zero?
int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p
main() { char *p = “ayqm”; char c; c = ++*p++; printf(“%c”,c); }
x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit >> (i - (i -1))); } } a. 512, 256, 0, 0, 0 b. 256, 256, 0, 0, 0 c. 512, 512, 512, 512, 512 d. 256, 256, 256, 256, 256
main() { extern out; printf("%d", out); } int out=100;