MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the output of the following program?#include<stdio.h>main(){ float t = 2; switch(t) { case 2:printf("Hi"); default:printf("Hello"); }}
A
Hi
B
Hello
C
HiHello
D
Error
Explanation: 

Detailed explanation-1: -Programs require data to be input. This data is used (processed) by the program, and data (or information ) is output as a result.

Detailed explanation-2: -Explanation: int a=250; The variable a is declared as an integer type and initialized to value 250. printf("%1d ", a); It prints the value of variable a. Hence the output of the program is 250.

Detailed explanation-3: -output is just what happens onces all the code is done, the end result. after all the calculation are done its what get put into the console. basically its what gets put out.

There is 1 question to complete.