#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}

Answer Posted / subha raman

yeah..itz mainly syntax error..
there shud not be any declaration of variables..in
case "j"..it must be "case 2"only..

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is d scanf?

599


write a program fibonacci series and palindrome program in c

633


What is the difference between a string and an array?

711


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

640


What is zero based addressing?

722






What is an auto variable in c?

760


How can I direct output to the printer?

815


what do u mean by Direct access files? then can u explain about Direct Access Files?

1645


What are the advantages and disadvantages of a heap?

716


What are linker error?

618


Add Two Numbers Without Using the Addition Operator

357


What is function prototype?

613


What is header file in c?

607


Can a void pointer point to a function?

578


How can I sort a linked list?

639