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

A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

1060


How do I copy files?

1009


What are data types in c language?

1021


What is a memory leak? How to avoid it?

1269


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

1235


What is include directive in c?

1105


Why array is used in c?

977


What are extern variables in c?

956


What is the explanation for cyclic nature of data types in c?

1150


Explain the array representation of a binary tree in C.

1177


Explain how do you declare an array that will hold more than 64kb of data?

1403


i have a written test for microland please give me test pattern

2682


What is pointer in c?

1149


How do you define a function?

982


What is the difference between exit() and _exit() function in c?

1032