aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Data Types, Variables & Storage Classes
  • 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 T='T'; printf(%c,T+6); }

  1. Z

  2. Y

  3. X

  4. W

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

The ASCII value of 'T' is 84. So, the value of T + 6 is 90. Hence, '%c' converts the integer 90 to character 'Z'.

Keep practicing — related questions

  • 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() { printf(Hello ); printf(World); }
  • What would be the output of the following? void main() { int z,x=5,y=-10,a=4,b=2; z=x++ - --y *b/a; printf(...
  • What will be the output of the following C code? void main() { int t; char *pc=(char *)0; float *pf=(float ...
  • What is the output of the following piece of code? int x = 3, y = 5, z; z = x + ++y; printf(“%d”,z);
  • What will be the output of following C code? void main() { int t,*pt; register int y,*py; pt=&t; py=&y; t=1...
  • What is the output of the given code? int main() { int x = 24; int y = 42; int z = 37; int a = 22; printf(%...
  • What is the output of the following piece of code? int x = 3, y = 5, z ; z = x++ + ++y; printf(“%d”,z);
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