aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Programming - 2
  • printf( “ab”, “cd”, “ef”); prints
Multiple choice

printf( “ab”, “cd”, “ef”); prints

  1. ab

  2. abcdef

  3. abcdef, followed by garbage

  4. none of above

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

The printf function takes a format string as the first argument. Subsequent arguments are ignored if there are no format specifiers in the string.

Keep practicing — related questions

  • The statement printf (“%d”, sizeof(“”)); prints
  • What will be the output of the following set of code after execution? void main() { printf(“%c %d”,'C','C'); }
  • What will be the output of the following set of codes after execution? void main() { printf(“%d”,sizeof(' '...
  • What will be the output of the following set of code after execution? void main() { printf(“ABC +CDE”); }
  • printf("%d",printf("What this will print"));
  • What does the statement printf(“%d”,10?0?5:11:12); print?
  • Print the output of this program main() { int k = 5; if (++k < 5 && k++/5 || ++k <= 8); printf("%d\n", k); }
  • The following program results in main() { printf(“%u”, main); }
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy