aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java and C Programming Fundamentals
  • Consider the following C statement. int a = 3,b = 2; a+ =...
Multiple choice

Consider the following C statement. int a = 3,b = 2; a+ = b++; printf(!!!^!!!a = %d!!!^!!!,a); What would be the value of 'a'?

  1. a = 6

  2. a = 5

  3. a = 4

  4. a = 3

  5. Compiler error

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

This is the correct option as initial value of a is 3, and after addition with b, results in 5.

Keep practicing — related questions

  • What will be the value of 'a' in the following C code? int a=5; printf(&"&a=%d&"&,a&2);
  • What would be the output of the following C statement? char ch; ch = 'A';ch = - ch + 'a'; printf(!!!^!!!ch ...
  • What will be the output of the following program : void main() { int a=1,b=2,c=3; c=(--a, b++)-c; printf("%...
  • Consider the following C statement: int i = 5, n = 2, z;z = (i! =n) || i>n && n; printf(z = %d,z); What wou...
  • What will be the output of the following program : void main() { int a=1,b=2,c=3,d=4,e; e=(a,a)+(b,c)+(c,d)...
  • main(){ int a,b; a=0; b=(a=1)?2:3; printf("%d %d",a,b); }
  • What will be the output of the following code? #include<stdio.h> int main() { int num,a=5; num=-a--; printf...
  • What would be the output of the following 'C' statement? void main() { int i=1, j=5; while(i<j) { printf("v...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy