Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 128

  Shared By: Adah Miller    Date: Jan 24    Category: C Programming    Views: 61

Answer:

main()
{
char p[ ]="%d\n";
p[1] = 'c';
printf(p,65);
}


Answer:
A


Explanation:
Due to the assignment p[1] = ‘c’ the string becomes, “%c\n”. Since this string becomes the format string for printf and ASCII value of 65 is ‘A’, the same gets printed.

Share: 
 

Didn't find what you were looking for? Find more on C programming practical question 128 Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: