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 |
Write a routine to implement the polymarker function
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!
How we print the table of 2 using for loop in c programing?
main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }
void main() { int i; char a[]="\0"; if(printf("%s\n",a)) printf("Ok here \n"); else printf("Forget it\n"); }
void main() { unsigned giveit=-1; int gotit; printf("%u ",++giveit); printf("%u \n",gotit=--giveit); }
main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }
how to swap 3 nos without using temporary variable
main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }