#include<stdio.h>
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
Answer / susie
Answer :
Compiler Error: Constant expression required in
function main.
Explanation:
The case statement can have only constant expressions (this
implies that we cannot use variable names directly so an error).
Note:
Enumerated types can be used in case statements.
| Is This Answer Correct ? | 3 Yes | 0 No |
how can u draw a rectangle in C
53 Answers Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,
print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!
can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(ā%dā,k); }
#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }
How to palindrom string in c language?
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
Design an implement of the inputs functions for event mode
find A^B using Recursive function
void main() { int c; c=printf("Hello world"); printf("\n%d",c); }
main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }