consider the following program sigment
int n,sum=1;
switch(n) {
case 2:sum=sum+2;
case 3:sum*=2;
break;
default:sum=0;}
if n=2, what is the value of sum
a.0
b.6
c.3
d.none
Answer Posted / guest
6
Is This Answer Correct ? | 19 Yes | 0 No |
Post New Answer View All Answers
Why are algorithms important in c program?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
What are global variables and explain how do you declare them?
What is the right type to use for boolean values in c? Is there a standard type?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
Explain what is meant by high-order and low-order bytes?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
write a programming in c to find the sum of all elements in an array through function.
What are the advantages of using macro in c language?
What do you mean by dynamic memory allocation in c? What functions are used?
What is an auto variable in c?
Which of these functions is safer to use : fgets(), gets()? Why?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
What is C language ?
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if