what is the output of the program and explain why??
#include<stdio.h>
void main ( )
{
int k=4,j=0:
switch (k)
{
case 3;
j=300;
case 4:
j=400:
case 5:
j=500;
}
printf (ā%d\nā,j);
}
Answer Posted / kalyan chukka
Ans is 500 i dont know y it printing 500 u mention k=3 or 4
or 5 any no it prints only 500
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is scope and lifetime of a variable in c?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
Can a file other than a .h file be included with #include?
Explain the difference between ++u and u++?
How main function is called in c?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
How do we open a binary file in Read/Write mode in C?
Write a program to show the change in position of a cursor using c
What is character constants?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
Write a program to print fibonacci series using recursion?
What is the use of getch ()?
What is double pointer?
Explain the process of converting a Tree into a Binary Tree.
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above