aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java and C Programming Fundamentals
  • What would be the output of the following C statement? ch...
Multiple choice

What would be the output of the following C statement? char ch; ch = 'A';ch = - ch + 'a'; printf(!!!^!!!ch = %d!!!^!!!,ch);

  1. ch = 162

  2. ch = 32

  3. ch = - 32

  4. Compiler error

  5. ch = 65

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

This is the correct option as the ASCII value of 'a' is 97 and 'A' is 65, and their difference is 32.

Keep practicing — related questions

  • What will be the output of the following C code? void main() { char ch=321; printf(%d %c,ch,ch); }
  • Consider the following C statements. int i,alpha = 65; char ch[27]; for(i = 0;i<2;i++) { ch[i] = alpha; alp...
  • What will be the output of following code segment? #include #include void main() { char c=-'a'; printf("%d"...
  • What will be output if you will Execute following code? #include #include void main() { char c=-'a'; printf...
  • Consider the following C statement. int a = 3,b = 2; a+ = b++; printf(!!!^!!!a = %d!!!^!!!,a); What would b...
  • What will be the output of the following code? #include<stdio.h> #include<conio.h> void main() { char c=-'a...
  • What will be the output of the following C code? void main() { int a; char *pr; int Num=288; pr=(char *)&Nu...
  • What does the following C statement print? print(“%d”, ++5);
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