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

What is "Duff's Device"?

1221


What is calloc() function?

1164


What are the uses of null pointers?

1198


Is c still used?

1097


What is abstract data structure in c?

1110


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1137


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

1129


Difference between Function to pointer and pointer to function

1130


What are register variables in c?

1051


Describe the modifier in c?

1145


Compare and contrast compilers from interpreters.

1181


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

1322


What is || operator and how does it function in a program?

1162


How can I manipulate strings of multibyte characters?

1158


What do you mean by keywords in c?

1201