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 / amik
the answer will b 500 becoz...when first k = 4 is
executing...the value of j is 400 den thr is no break
statement...so it will continue..nd at the end of the
switch..j will contain or retain.. the value 500
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is file in c language?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
How do we open a binary file in Read/Write mode in C?
C program to find all possible outcomes of a dice?
What is use of bit field?
What is a struct c#?
Explain how can I open a file so that other programs can update it at the same time?
What is the function of volatile in c language?
What is %g in c?
What does do in c?
How will you delete a node in DLL?
Do pointers take up memory?
Write a program to maintain student’s record. Record should
not be available to any unauthorized user. There are three
(3) categories of users. Each user has its own type. It
depends upon user’s type that which kind of operations user
can perform. Their types and options are mentioned below:
1. Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record)
2. Super Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record, Delete Single Record)
3. Guest
(Search Record [by Reg. No or Name], View All Records)
When first time program runs, it asks to create accounts.
Each user type has only 1 account (which means that there
can be maximum 3 accounts). In account creation, following
options are required:
Login Name: <6-10 alphabets long, should be unique>
Password: <6-10 alphabets long, should not display
characters when user type>
Confirm Password:
Why structure is used in c?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none