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 following program?
main()
{
int c[]={2,8,3,4,4,6,7,5};
int j,*p=c,*q=c;
for(j=0;j<5;j++)
{
printf("%d",*c);
++q;
}
for(j=0;j<5;j++)
{
printf("%d",*p);
++p;
}
}

Answer Posted / vignesh1988i

2222228344...

the above code can be remodified as :
printf("%d",*q); in first printf statement to get the same
output for both printf statements



thank u

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are the advantages and disadvantages of a heap?

1130


What is keyword in c?

1067


How is a macro different from a function?

1250


Explain how can you avoid including a header more than once?

1149


What is #include conio h?

1057


What is a static function in c?

1246


Explain what does it mean when a pointer is used in an if statement?

1108


Which one would you prefer - a macro or a function?

1137


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1131


Why main is not a keyword in c?

1325


Can the “if” function be used in comparing strings?

1110


What are pointers?

1162


What is static and auto variables in c?

1145


Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.

4261


How can I invoke another program or command and trap its output?

1157