aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Data Types, Variables and Storage Classes
  • What will be the output of the following set of code afte...
Multiple choice

What will be the output of the following set of code after execution?

void main() { printf(“%d %d”,sizeof('9'),sizeof(567)); }

  1. 1 3

  2. 1 2

  3. 2 2

  4. 2 3

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

sizeof('9') gives 1 because '9' is a character not integer and sizeof(567) gives 2 because 567 is an integer.

Keep practicing — related questions

  • What is the value displayed when the following is executed? Assume that the code was executed using the fol...
  • Following code will result in: class A { public static void main(String [] args) {B b = new A(); }} class B...
  • What is the result of compiling and running the following code? class StringBufferTest{ public static void ...
  • What will be printed as the result of the operation below: main() { int x=10, y=15; x = x++; y = ++y; print...
  • What is the output? public class Wow { public static void go(short n) {System.out.println("short");} public...
  • In Mourinho's first season in charge, Chelsea romped to the league title setting many records, but which of...
  • Wich 1 of d following is not of d Eighth Wonder of the World(Pre-1900 creations)???
  • What should come in the place of question mark in the following series? 4,6,9,13,18,?
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