#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}

Answer Posted / pravin

if we use the single qutoes' 'at 1 and j the rest of
program is right because we already decleared the value of i
and i=1 .
so output should be "GOOD" only. (without" ")

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 4 types of programming language?

581


What is the use of clrscr?

597


How can I change their mode to binary?

698


Difference between Function to pointer and pointer to function

631


What are the complete rules for header file searching?

674






In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1380


Are global variables static in c?

675


Difference between macros and inline functions? Can a function be forced as inline?

710


Who is the main contributor in designing the c language after dennis ritchie?

553


What are the different categories of functions in c?

643


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

646


Function calling procedures? and their differences? Why should one go for Call by Reference?

635


What is pass by value in c?

596


the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....

22226


What is the use of #define preprocessor in c?

615