What is the output of this C code ?
Function main() {
integer a = 5, b = 7
Switch(a) {
Case 5: print "I am 5"
Break
Case b: print "I am not 5"
Break
Default: print "I am different"
}
}
A. I am 5
B. I am not 5
C. I am different
D. Error
E. None of these
Answer : D. Error
Explanation:
- Break doesn’t have “;” (Semi Colon missing in break command)
Related Tags
- Accentur interview questions and answers,
- algorithm for switch case in c,
- Applied Materials interview questions and answers,
- Asian Paints Ltd. interview questions and answers,
- Bosch India Software interview questions and answers,
- c program for switch case using function,
- C programming switch case examples,
- C programming switch case Examples/Programs,
- C programming switch case Programs,
- C switch case Statement,
- Capgemini interview questions and answers,
- CASTING NETWORKS INDIA PVT LIMITED interview questions and answers,
- CGI Group Inc interview questions and answers,
- Chetu interview questions and answers,
- Ciena Corporation interview questions and answers,
- Collabera Technologies interview questions and answers,
- Dell International Services India Pvt Ltd interview questions and answers,
- DHFL Pramerica Life Insurance Company Ltd interview questions and answers,
- Elico HealthCare Services Ltd interview questions and answers,
- Flipkart interview questions and answers,
- HCL Technol interview questions and answers,
- How does the switch and break work in C,
- IBM interview questions and answers,
- Indecomm Global Services interview questions and answers,
- Java switch Statement,
- Mavenir interview questions and answers,
- Mphasis interview questions and answers,
- NetApp interview questions and answers,
- Oracle Corporation interview questions and answers,
- PeopleStrong interview questions and answers,
- Program for Switch Case with and without break statement,
- R Systems interview questions and answers,
- Raqmiyat Information Technologies Pvt Ltd interview questions and answers,
- Reliance Industries Ltd interview questions and answers,
- SAP Labs India Pvt Ltd interview questions and answers,
- switch case,
- switch case c,
- switch case example in c,
- switch case exercises in c,
- switch case in c programming examples,
- switch case in c programming questions,
- switch case program in c,
- switch case statement in C Programming,
- switch caseswitch case statement in C Programming,
- switch statement in c++,
- Tata AIA Life Insurance interview questions and answers,
- Tech Mahindr interview questions and answers,
- The Linde Group interview questions and answers,
- What is switch condition,
- while c programming