SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Let us c(by yashwant kanetkar)
chapter 4 solution 5th
edition
Exercise:-
[A]
(a).
Heart
I thought one wears a suite
(b).
I am in case 3
(c).
Pure Simple Egghead!
(d).
Customers are dicey
Markets are pricey
Investers are moody
At least employees are good
(e).
Trapped
(f).
You entered a and b
(g).
Feeding fish
Weeding grass
mending roof
Just to servive
[B]
(a).
After switch semicolon ( ' ; ' ) is written which is wrong
incorrect statement:-switch(suite);
correct statement:-switch(suite)
(b).
In the case statement we never used the expression o
we only write the integer in the case statement.
(c).
We can not write floating value inside the switch and case statement we can only
write integer value.
(d).
We only write the integer value in the case statement not the expression of integer
constant or the expression of integer variable.
[D]
/*To find grace marks using switch*/
#include<stdio.h>
void main()
{
int sub,cls;
printf("Enter the no. of subjects in which a student has failedn");
scanf("%d",&sub);
printf("enter the class through which the student has passed(write 1 instead of
1st div.,write 2 instead of 2nd div.,write 3 instead of 3rd
div.n");
scanf("%d",&cls);
switch(cls)
{
case 1:
switch(sub)
{
case 1:
printf("grace marks=5n");
break;
case 2:
printf("grace marks=10n");
break;
case 3:
printf("grace marks=15n");
break;
default:
printf("No grace marksn");
}
break;
case 2:
switch(sub)
{
case 1:
printf("grace marks=4n");
break;
case 2:
printf("grace marks=8n");
break;
default:
printf("no grace marksn");
}
break;
case 3:
switch(sub)
{
case 1:
printf("grace marks=5n");
break;
default:
printf("No grace marksn");
}
}
}
THANKS.............

More Related Content

PDF
Let us c(by yashwant kanetkar) chapter 2 solution
DOCX
Let us C (by yashvant Kanetkar) chapter 3 Solution
DOCX
Chapter 8 c solution
PDF
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
DOCX
Let us c (by yashvant kanetkar) chapter 1 solution
DOC
Let us c (5th and 12th edition by YASHVANT KANETKAR) chapter 2 solution
PDF
LET US C (5th EDITION) CHAPTER 2 ANSWERS
PDF
LET US C (5th EDITION) CHAPTER 4 ANSWERS
Let us c(by yashwant kanetkar) chapter 2 solution
Let us C (by yashvant Kanetkar) chapter 3 Solution
Chapter 8 c solution
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
Let us c (by yashvant kanetkar) chapter 1 solution
Let us c (5th and 12th edition by YASHVANT KANETKAR) chapter 2 solution
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 4 ANSWERS

What's hot (20)

PDF
LET US C (5th EDITION) CHAPTER 1 ANSWERS
DOCX
Practical File of C Language
PDF
Chapter 4 : Balagurusamy Programming ANSI in C
PPTX
Programming in C Presentation upto FILE
PPTX
Introduction to Array ppt
PDF
Chapter 2 : Balagurusamy_ Programming ANsI in C
PPT
File handling in c
DOCX
C program report tips
PPTX
C Programming Unit-5
PPTX
Managing input and output operations in c
PPTX
Basic Input and Output
PPTX
File in C language
RTF
PPTX
Data Types In C
PPTX
Lecture 2 C++ | Variable Scope, Operators in c++
DOCX
Data Structures Using C Practical File
PDF
Programming in C Lab
PPTX
Input output statement in C
PDF
Chapter 5 exercises Balagurusamy Programming ANSI in c
PPTX
Call by value or call by reference in C++
LET US C (5th EDITION) CHAPTER 1 ANSWERS
Practical File of C Language
Chapter 4 : Balagurusamy Programming ANSI in C
Programming in C Presentation upto FILE
Introduction to Array ppt
Chapter 2 : Balagurusamy_ Programming ANsI in C
File handling in c
C program report tips
C Programming Unit-5
Managing input and output operations in c
Basic Input and Output
File in C language
Data Types In C
Lecture 2 C++ | Variable Scope, Operators in c++
Data Structures Using C Practical File
Programming in C Lab
Input output statement in C
Chapter 5 exercises Balagurusamy Programming ANSI in c
Call by value or call by reference in C++
Ad

Similar to Let us c chapter 4 solution (20)

PDF
Programming in C Conditional statements.pdf
PPTX
Cs1123 5 selection_if
PDF
ICP - Lecture 7 and 8
PPT
CONTROLSTRUCTURES.ppt
PDF
Control statements-Computer programming
PPTX
Ch5 Selection Statements
PDF
3-Conditional-if-else-switch btech computer in c.pdf
PDF
Loop's definition and practical code in C programming
PDF
Principals of Programming in CModule -5.pdfModule_2_P2 (1).pdf
PPTX
Lbvgytftyrytfgcjhvhvvvvvvvvvvvvecture 19.pptx
DOCX
Chapter 4(1)
PDF
Chapter 3 branching v4
PDF
Lecture04(control structure part i)
PDF
6 c control statements branching &amp; jumping
DOCX
Cs291 assignment solution
PPT
Control flow in c
PDF
C in 10 Hours learn programming easily.pdf.pdf
DOCX
programs of c www.eakanchha.com
PDF
POP Unit 2.pptx.pdf for your time and gauss with example
Programming in C Conditional statements.pdf
Cs1123 5 selection_if
ICP - Lecture 7 and 8
CONTROLSTRUCTURES.ppt
Control statements-Computer programming
Ch5 Selection Statements
3-Conditional-if-else-switch btech computer in c.pdf
Loop's definition and practical code in C programming
Principals of Programming in CModule -5.pdfModule_2_P2 (1).pdf
Lbvgytftyrytfgcjhvhvvvvvvvvvvvvecture 19.pptx
Chapter 4(1)
Chapter 3 branching v4
Lecture04(control structure part i)
6 c control statements branching &amp; jumping
Cs291 assignment solution
Control flow in c
C in 10 Hours learn programming easily.pdf.pdf
programs of c www.eakanchha.com
POP Unit 2.pptx.pdf for your time and gauss with example
Ad

Recently uploaded (20)

PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
Pharma ospi slides which help in ospi learning
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Business Ethics Teaching Materials for college
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Microbial disease of the cardiovascular and lymphatic systems
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Supply Chain Operations Speaking Notes -ICLT Program
human mycosis Human fungal infections are called human mycosis..pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Anesthesia in Laparoscopic Surgery in India
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
01-Introduction-to-Information-Management.pdf
Final Presentation General Medicine 03-08-2024.pptx
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Week 4 Term 3 Study Techniques revisited.pptx
Pharma ospi slides which help in ospi learning
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Business Ethics Teaching Materials for college
school management -TNTEU- B.Ed., Semester II Unit 1.pptx

Let us c chapter 4 solution

  • 1. Let us c(by yashwant kanetkar) chapter 4 solution 5th edition Exercise:- [A] (a). Heart I thought one wears a suite (b). I am in case 3 (c). Pure Simple Egghead! (d). Customers are dicey Markets are pricey Investers are moody At least employees are good (e). Trapped (f). You entered a and b
  • 2. (g). Feeding fish Weeding grass mending roof Just to servive [B] (a). After switch semicolon ( ' ; ' ) is written which is wrong incorrect statement:-switch(suite); correct statement:-switch(suite) (b). In the case statement we never used the expression o we only write the integer in the case statement. (c). We can not write floating value inside the switch and case statement we can only write integer value. (d). We only write the integer value in the case statement not the expression of integer constant or the expression of integer variable. [D] /*To find grace marks using switch*/ #include<stdio.h> void main() { int sub,cls; printf("Enter the no. of subjects in which a student has failedn"); scanf("%d",&sub);
  • 3. printf("enter the class through which the student has passed(write 1 instead of 1st div.,write 2 instead of 2nd div.,write 3 instead of 3rd div.n"); scanf("%d",&cls); switch(cls) { case 1: switch(sub) { case 1: printf("grace marks=5n"); break; case 2: printf("grace marks=10n"); break; case 3: printf("grace marks=15n"); break; default: printf("No grace marksn"); } break; case 2: switch(sub) { case 1: printf("grace marks=4n"); break; case 2: printf("grace marks=8n"); break;
  • 4. default: printf("no grace marksn"); } break; case 3: switch(sub) { case 1: printf("grace marks=5n"); break; default: printf("No grace marksn"); } } } THANKS.............