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

How can I open files mentioned on the command line, and parse option flags?

1070


Which is the best website to learn c programming?

1078


What is an array? What the different types of arrays in c?

1181


Can you tell me how to check whether a linked list is circular?

1408


What is a pointer in c plus plus?

1303


Do pointers store the address of value or the actual value of a variable?

1077


What is difference between structure and union?

1125


Explain how can you tell whether two strings are the same?

1011


What are terms in math?

1045


What are the types of i/o functions?

1336


Explain what is the difference between text files and binary files?

1154


What is meant by preprocessor in c?

1010


how is the examination pattern?

2018


What is pointers in c with example?

1071


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

2271