TCS Company Programming Program

Predict the output of this code snippet?

#include
int main()
{
int i = 3;
switch (i)
{
case 0+1: printf(“Cyber”);
break;
case 1+2: printf(“Tecz”);
break;
default: printf(“CyberTecz”);
}
return 0;
}

A)Cyber B)Tecz C)CyberTecz D)Compiler error

Read Solution (Total 9)

TCS Other Question

Identify the line number in which the error exists?
# include
# include
void main()
{
float a = 100.00;
{
auto float a = 250.14;
{
auto float b = 325;
printf(“n%f %f”, a, b);
b++;
}
a++;
printf(“n%f %f”, a, b);
a++;
}
printf(“n%f”, a);
}

A)line number 5 B)line number 7 C)line number 9 D)line number 14
The value obtained in the function is given back to the main by using ________ keyword?
A)Return B)Static C)New D)Volatile