int main()
{
int i=1;
switch(i)
{
case '1':
printf("hello");
break;
case 1:
printf("Hi");
break;
case 49:
printf("Good Morning");
break;
}
return 0;
}
Answer Posted / srsabariselvan
The program Results in Error.
it will shows error "Duplicate case".
because '1' is equal to 49(ASCII of character 1).
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
When would you use a pointer to a function?
What is printf () in c?
What is omp_num_threads?
What is an operator?
formula to convert 2500mmh2o into m3/hr
What is a char c?
Explain what are the standard predefined macros?
Where does the name "C" come from, anyway?
Why is extern used in c?
can anyone suggest some site name..where i can get some good data structure puzzles???
What is gets() function?
What are lookup tables in c?
In a header file whether functions are declared or defined?
What is the basic structure of c?
What is pointer to pointer in c language?