wat is output of the following

int main()
{
const int j=2;
int i;
switch(i)
{
case 1:break;
case j:break;
default:break;
}
}

Answer Posted / vikash gaurav

output will be nothing.... since i will have garbage value.
once going to switch case the value will not match with any
case so default value will be executed.

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain why c is faster than c++?

810


In c language can we compile a program without main() function?

841


Explain what is a program flowchart and explain how does it help in writing a program?

866


What are the different types of errors?

833


What is malloc calloc and realloc in c?

913


Is flag a keyword in c?

902


What is define directive?

856


What is property type c?

833


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.

1696


What is action and transformation in spark?

831


Why c is called free form language?

762


Tell me about low level programming languages.

865


int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above

987


What is the role of && operator in a program code?

794


How to explain the final year project as a fresher please answer with sample project

718