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 / prashanth
the answer is 500 as break is not mentioned it goes to case
5 from case4 so value of j=500
Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is identifiers in c with examples?
Write a simple code fragment that will check if a number is positive or negative.
What is a pointer and how it is initialized?
Define macros.
Why malloc is faster than calloc?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
What is the significance of scope resolution operator?
How do you define structure?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
How do you print only part of a string?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What are categories used for in c?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
What is a pointer on a pointer in c programming language?
Linked lists -- can you tell me how to check whether a linked list is circular?