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

How can you be sure that a program follows the ANSI C standard?

1132


For what purpose null pointer used?

609


Who is the main contributor in designing the c language after dennis ritchie?

554


write a proram to reverse the string using switch case?

2470


hi any body pls give me company name interview conduct "c" language only

1670






What are the types of functions in c?

576


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

653


Where is c used?

652


How can a string be converted to a number?

519


What is the difference between fread buffer() and fwrite buffer()?

674


What are the key features in c programming language?

618


What is line in c preprocessor?

617


How can you return multiple values from a function?

634


Can you write the function prototype, definition and mention the other requirements.

664


Which is better malloc or calloc?

654