aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Programming Fundamentals
  • What will be the output of the following C code? void mai...
Multiple choice

What will be the output of the following C code? void main() { int *ptr=&"&Chennai&"&; printf(&"&%c&"&,++(ptr++)); }

  1. C

  2. d

  3. e

  4. a

  5. i

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is the correct option as the contents of pointer is incremented by 1 to store 'd'.

Keep practicing — related questions

  • What will be the output of the following program? void main() { int val=1234; int* ptr=&val; printf("%d %d"...
  • What will be the output of the following C code? void main() { printf(Hello ); printf(World); }
  • What will be the output of the following program : void main() { int val=50; void *ptr; ptr=&val; printf("%...
  • What will be the output of the following: void main() { char const *ptr="abc"; ptr="xyz"; printf("%s",ptr); }
  • What will be the output of the following: void main() { char * const ptr="abc"; ptr="xyz"; printf("%s",ptr); }
  • What will be the output of the following C code? void main() { int t=70,c=14,d; d=t/**//c; printf(%d,d); }
  • What will be the output of the following C code? void main() { int T='T'; printf(%c,T+6); }
  • What will be the output of following C code? void main() { int t,*pt; register int y,*py; pt=&t; py=&y; t=1...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Output Evaluation (1721 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy