define switch statement?
Answers were Sorted based on User's Feedback
Answer / abirami
it is used to check the various type of cases in one program.
Is This Answer Correct ? | 20 Yes | 1 No |
Answer / krishna
Switch statement is a selection statement which is used in a situation where there exists various cases and one needs to jump over to the required statement without executing the precedence statements
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / d.jeswanth
switch statement can be defined as " it can choose a
related option from the multiple options ".it belongs to
control and conditonal statements.
*************thank you************
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / vijay
Its used to select the part of program to the execution
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / amit
A switch statement is a selection statement that lets you
transfer control to different statements within the switch
body depending on the value of the switch expression. The
switch expression must evaluate to an integral or enumeration
value.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / amit
A switch statement is a selection statement that lets you
transfer control to different statements within the switch
body depending on the value of the switch expression. The
switch expression must evaluate to an integral or enumeration
value.
Is This Answer Correct ? | 0 Yes | 0 No |
what is the stackpointer
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
What is a ternary operator in c?
main() { charx; while (x=0;x<=255;x++) printf("\nAscii value %d Character %c,x,x); }
#include<stdio.h> #include<conio.h> void main() { clrscr(); int a=0,b=0,c=0; printf("enter value of a,b"); scanf(" %d %d",a,b); c=a+b; printf("sum is %d",c); getch(); }
Write a program in C to print the alphabets in order as on a mobile phone.i.e:When 2 is pressed once 'a' prints and if it is pressed two times 'b' prints and so on.we have to print all the alphabets as on mobile phone like this.
Which command is more efficient? *(ptr+1) or ptr[1]
#include<stdio.h> int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20
#define DCHAR char* typedef char* TCHAR; if using these following variables will be declared like DCHAR ch1, ch2; TCHAR ch3, ch4; then what will be types of ch1, ch2, ch3 and ch4?
Is it possible to execute code even after the program exits the main() function?
main() { static char *s[]={"black","white","yellow","voilet"}; char **ptr[]={s+3,s+2,s+1,s}, ***p; p=ptr; **++p; printf("%s",*--*++p+3); }
What is a far pointer in c?