Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the output of the below program & why ?
#include<stdio.h>
void main()
{
int a=10,b=20,c=30;
printf("%d",scanf("%d%d%d",&a,&b,&c));
}

Answers were Sorted based on User's Feedback



what is the output of the below program & why ? #include<stdio.h> void main() { int a=..

Answer / gaurav sharma

because printf returns the number of printed arguments .here
3 arguments taken ,the concept is ( scanf also return the
number of arguments so 3 returned to printf .m gaurav
sharma ,,,,,works in aricent.

Is This Answer Correct ?    8 Yes 0 No

what is the output of the below program & why ? #include<stdio.h> void main() { int a=..

Answer / vibekananda dash

dear selvam,

its showing o/p,
its ask for entry and it accept ur entry,
o/p is -
i entered
1
press enter 2
press enter 78
press enter 3.


my question is why its showing 3.

Is This Answer Correct ?    4 Yes 0 No

what is the output of the below program & why ? #include<stdio.h> void main() { int a=..

Answer / kalyani

The answer is 3 because scanf returns no of arguments

Is This Answer Correct ?    5 Yes 1 No

what is the output of the below program & why ? #include<stdio.h> void main() { int a=..

Answer / arun

BUT IT IS SHOWIING -1 ANSWER IN GCC COMPLIER

Is This Answer Correct ?    2 Yes 1 No

what is the output of the below program & why ? #include<stdio.h> void main() { int a=..

Answer / arka bandyopadhyay

for Gcc compiler the code is producing error infact DevC++ just crashed . But using ANSI turbo C++ Ans is 3 ,
As the number of parameters in the printf() function is 3

Is This Answer Correct ?    1 Yes 0 No

what is the output of the below program & why ? #include<stdio.h> void main() { int a=..

Answer / selvam

this program contain no error and it will not give any output...

Is This Answer Correct ?    4 Yes 5 No

Post New Answer

More C Code Interview Questions

How can i find first 5 natural Numbers without using any loop in c language????????

2 Answers   Microsoft,


Sorting entire link list using selection sort and insertion sort and calculating their time complexity

1 Answers   Infosys, Microsoft, NetApp,


main() { int *j; { int i=10; j=&i; } printf("%d",*j); }

9 Answers   HCL, Wipro,


#include<stdio.h> #include<conio.h> void main() { int a=(1,2,3,(1,2,3,4); switch(a) { printf("ans:"); case 1: printf("1");break; case 2: printf("2");break; case 3: printf("1");break; case 4: printf("4");break; printf("end"); } getch(); }

0 Answers  


#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }

1 Answers  


int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }

3 Answers   Cisco, HCL,


write the function. if all the character in string B appear in string A, return true, otherwise return false.

11 Answers   Google,


#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }

3 Answers  


#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }

1 Answers  


#define a 10 void foo() { #undef a #define a 50 } int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } explain the answer

1 Answers  


void main() { int i=5; printf("%d",i+++++i); }

3 Answers  


main( ) { int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}}; printf(ā€œ%u %u %u %d \nā€,a,*a,**a,***a); printf(ā€œ%u %u %u %d \nā€,a+1,*a+1,**a+1,***a+1); }

2 Answers  


Categories