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 for the code :
main()
{
int i,j;
printf("%d %d ",scanf("%d%d",&i,&j));
}

Answer Posted / carol

scanf will return the number of arguments that are scanned
successfully from keyboard.So first it will get two values
from the user and return two . So the printf statement
prints 2 for the first %d and since there is no specific
value for second %d it will print garbage value.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where are c variables stored in memory?

1023


What functions are in conio h?

1151


Define the scope of static variables.

1064


What is volatile variable in c?

1054


what does static variable mean?

1050


In c programming language, how many parameters can be passed to a function ?

1053


Why doesnt the call scanf work?

1138


Explain how do you list files in a directory?

1017


i got 75% in all semester am i eligible for your company

2172


Explain the term printf() and scanf() used in c language?

999


Is flag a keyword in c?

1109


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

1104


What is fflush() function?

1080


What is a function in c?

1485


What is c system32 taskhostw exe?

975