aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C programming
  • What would be the result of the following statement in C?...
Multiple choice

What would be the result of the following statement in C?

printf(n %d,4%3)

  1. 1

  2. 4

  3. 3

  4. None of these

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

% symbol refers to modulus operator in C, which returns remainder when two integers are divided.hence, it is the correct answer.

Keep practicing — related questions

  • What does the statement printf(“%d”,10?0?5:11:12); print?
  • What does the following C statement print? print(“%d”, ++5);
  • What is the output of the following piece of code: int x = 7; if ( x = 3 ) printf( “%d“ , x);
  • What would be the output of the following? void main() { int a=10,b; b=a++ + ++a; printf("%d %d %d %d",b,a+...
  • What will be the output of the following set of code after execution? void main() { printf(“%d %d”,sizeof('...
  • Output of the following? printf("%d",-5/-4);
  • What would be the output of the following statement in 'C'? int i=0; do { i=i+3; printf(n i=%d,i); }while(i...
  • int a=10,b; b=a++ + ++a; printf(%d,%d,%d,%d,b,a++,a,++a); What will be the output when following code is ex...
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