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 |
int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }
main() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }
which function is used to clear the buffer stream on gcc? for example: I wrote following code on gcc #include<stdio.h> int main(void) { char ch; int a,b; printf("\nenter two numbers:\t"); scanf("%d%d",&a,&b); printf("enter number is %d and %d",a,b); printf("\nentercharacter:\t"); scanf("%c",&ch); printf("enter character is %c",ch); return 0; } in above progarm ch could not be scan. why?plz tell me solution.
Give a one-line C expression to test whether a number is a power of 2.
Printf can be implemented by using __________ list.
void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(ā%dā, i); }
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"
#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d----%d",*p,*q); }
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
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