#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
What are the 4 types of programming language?
What is the use of clrscr?
How can I change their mode to binary?
Difference between Function to pointer and pointer to function
What are the complete rules for header file searching?
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.
Are global variables static in c?
Difference between macros and inline functions? Can a function be forced as inline?
Who is the main contributor in designing the c language after dennis ritchie?
What are the different categories of functions in c?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
Function calling procedures? and their differences? Why should one go for Call by Reference?
What is pass by value in c?
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!+....
What is the use of #define preprocessor in c?