main()
{
int i=3;
switch(i)
{
default:printf("zero");
case 1: printf("one");
break;
case 2:printf("two");
break;
case 3: printf("three");
break;
}
}
Answer / susie
Answer : :
three
Explanation :
The default case can be placed anywhere inside
the loop. It is executed only when all other cases doesn't
match.
Is This Answer Correct ? | 18 Yes | 3 No |
write a c program to Reverse a given string using string function and also without string function
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
How will u find whether a linked list has a loop or not?
main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
main() { char a[4]="HELL"; printf("%s",a); }
Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.
#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }
#include <stdio.h> int main(void) { int a=4, b=2; a=b<<a+b>>2 ; printf("%d",a); return 0; }
Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.
1 Answers Samar State University,
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
how to return a multiple value from a function?
find simple interest & compund interest