TCS Company Programming Program

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

Read Solution (Total 2)

TCS Other Question

The in-order and pre-order traversal of a binary tree is D B E A F C G and A B D E C F G, respectively. The post-order traversal of the binary tree is:
A)D E B F G C A B)E D B G F C A C)E D B F G C A D)D E F G B C A
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