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.............
Ad

Recommended

Let us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solution
rohit kumar
 
Let us C (by yashvant Kanetkar) chapter 3 Solution
Let us C (by yashvant Kanetkar) chapter 3 Solution
Hazrat Bilal
 
Let us c (5th and 12th edition by YASHVANT KANETKAR) chapter 2 solution
Let us c (5th and 12th edition by YASHVANT KANETKAR) chapter 2 solution
Hazrat Bilal
 
Let us c (by yashvant kanetkar) chapter 1 solution
Let us c (by yashvant kanetkar) chapter 1 solution
Hazrat Bilal
 
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
rohit kumar
 
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERS
KavyaSharma65
 
Chapter 4 : Balagurusamy Programming ANSI in C
Chapter 4 : Balagurusamy Programming ANSI in C
BUBT
 
Chapter 5 Balagurusamy Programming ANSI in c
Chapter 5 Balagurusamy Programming ANSI in c
BUBT
 
Chapter 8 c solution
Chapter 8 c solution
Azhar Javed
 
Ansi c
Ansi c
dayaramjatt001
 
Chapter 2 : Balagurusamy_ Programming ANsI in C
Chapter 2 : Balagurusamy_ Programming ANsI in C
BUBT
 
C programs
C programs
Minu S
 
The solution manual of programming in ansi by Robin
The solution manual of programming in ansi by Robin
Shariful Haque Robin
 
Function in c program
Function in c program
umesh patil
 
Data Structures Practical File
Data Structures Practical File
Harjinder Singh
 
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 
C++ decision making
C++ decision making
Zohaib Ahmed
 
C Programming
C Programming
Sumant Diwakar
 
Function in c
Function in c
Raj Tandukar
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C
BUBT
 
Chapter 6 Balagurusamy Programming ANSI in c
Chapter 6 Balagurusamy Programming ANSI in c
BUBT
 
LET US C (5th EDITION) CHAPTER 4 ANSWERS
LET US C (5th EDITION) CHAPTER 4 ANSWERS
KavyaSharma65
 
Strings in c++
Strings in c++
Neeru Mittal
 
Practical File of C Language
Practical File of C Language
RAJWANT KAUR
 
Recursive Function
Recursive Function
Harsh Pathak
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
BUBT
 
String c
String c
thirumalaikumar3
 
Functions in c
Functions in c
sunila tharagaturi
 
Programming in C Conditional statements.pdf
Programming in C Conditional statements.pdf
Ramesh Wadawadagi
 
Cs1123 5 selection_if
Cs1123 5 selection_if
TAlha MAlik
 

More Related Content

What's hot (20)

Chapter 8 c solution
Chapter 8 c solution
Azhar Javed
 
Ansi c
Ansi c
dayaramjatt001
 
Chapter 2 : Balagurusamy_ Programming ANsI in C
Chapter 2 : Balagurusamy_ Programming ANsI in C
BUBT
 
C programs
C programs
Minu S
 
The solution manual of programming in ansi by Robin
The solution manual of programming in ansi by Robin
Shariful Haque Robin
 
Function in c program
Function in c program
umesh patil
 
Data Structures Practical File
Data Structures Practical File
Harjinder Singh
 
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 
C++ decision making
C++ decision making
Zohaib Ahmed
 
C Programming
C Programming
Sumant Diwakar
 
Function in c
Function in c
Raj Tandukar
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C
BUBT
 
Chapter 6 Balagurusamy Programming ANSI in c
Chapter 6 Balagurusamy Programming ANSI in c
BUBT
 
LET US C (5th EDITION) CHAPTER 4 ANSWERS
LET US C (5th EDITION) CHAPTER 4 ANSWERS
KavyaSharma65
 
Strings in c++
Strings in c++
Neeru Mittal
 
Practical File of C Language
Practical File of C Language
RAJWANT KAUR
 
Recursive Function
Recursive Function
Harsh Pathak
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
BUBT
 
String c
String c
thirumalaikumar3
 
Functions in c
Functions in c
sunila tharagaturi
 
Chapter 8 c solution
Chapter 8 c solution
Azhar Javed
 
Chapter 2 : Balagurusamy_ Programming ANsI in C
Chapter 2 : Balagurusamy_ Programming ANsI in C
BUBT
 
C programs
C programs
Minu S
 
The solution manual of programming in ansi by Robin
The solution manual of programming in ansi by Robin
Shariful Haque Robin
 
Function in c program
Function in c program
umesh patil
 
Data Structures Practical File
Data Structures Practical File
Harjinder Singh
 
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
SowmyaJyothi3
 
C++ decision making
C++ decision making
Zohaib Ahmed
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C
BUBT
 
Chapter 6 Balagurusamy Programming ANSI in c
Chapter 6 Balagurusamy Programming ANSI in c
BUBT
 
LET US C (5th EDITION) CHAPTER 4 ANSWERS
LET US C (5th EDITION) CHAPTER 4 ANSWERS
KavyaSharma65
 
Practical File of C Language
Practical File of C Language
RAJWANT KAUR
 
Recursive Function
Recursive Function
Harsh Pathak
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
BUBT
 

Similar to Let us c chapter 4 solution (20)

Programming in C Conditional statements.pdf
Programming in C Conditional statements.pdf
Ramesh Wadawadagi
 
Cs1123 5 selection_if
Cs1123 5 selection_if
TAlha MAlik
 
Vcs4
Vcs4
Malikireddy Bramhananda Reddy
 
ICP - Lecture 7 and 8
ICP - Lecture 7 and 8
Hassaan Rahman
 
CONTROLSTRUCTURES.ppt
CONTROLSTRUCTURES.ppt
Sanjjaayyy
 
Control statements-Computer programming
Control statements-Computer programming
nmahi96
 
Ch5 Selection Statements
Ch5 Selection Statements
SzeChingChen
 
3-Conditional-if-else-switch btech computer in c.pdf
3-Conditional-if-else-switch btech computer in c.pdf
ArkSingh7
 
Loop's definition and practical code in C programming
Loop's definition and practical code in C programming
DharmaKumariBhandari
 
Principals of Programming in CModule -5.pdfModule_2_P2 (1).pdf
Principals of Programming in CModule -5.pdfModule_2_P2 (1).pdf
anilcsbs
 
Lbvgytftyrytfgcjhvhvvvvvvvvvvvvecture 19.pptx
Lbvgytftyrytfgcjhvhvvvvvvvvvvvvecture 19.pptx
ApoorvMalviya2
 
Chapter 4(1)
Chapter 4(1)
TejaswiB4
 
Chapter 3 branching v4
Chapter 3 branching v4
Sunarto Quek
 
Lecture04(control structure part i)
Lecture04(control structure part i)
Dhaka University of Engineering & Technology(DUET)
 
6 c control statements branching &amp; jumping
6 c control statements branching &amp; jumping
MomenMostafa
 
Cs291 assignment solution
Cs291 assignment solution
Kuntal Bhowmick
 
Control flow in c
Control flow in c
thirumalaikumar3
 
C in 10 Hours learn programming easily.pdf.pdf
C in 10 Hours learn programming easily.pdf.pdf
eshaverma1710
 
programs of c www.eakanchha.com
programs of c www.eakanchha.com
Akanchha Agrawal
 
POP Unit 2.pptx.pdf for your time and gauss with example
POP Unit 2.pptx.pdf for your time and gauss with example
siddarameshav871
 
Programming in C Conditional statements.pdf
Programming in C Conditional statements.pdf
Ramesh Wadawadagi
 
Cs1123 5 selection_if
Cs1123 5 selection_if
TAlha MAlik
 
CONTROLSTRUCTURES.ppt
CONTROLSTRUCTURES.ppt
Sanjjaayyy
 
Control statements-Computer programming
Control statements-Computer programming
nmahi96
 
Ch5 Selection Statements
Ch5 Selection Statements
SzeChingChen
 
3-Conditional-if-else-switch btech computer in c.pdf
3-Conditional-if-else-switch btech computer in c.pdf
ArkSingh7
 
Loop's definition and practical code in C programming
Loop's definition and practical code in C programming
DharmaKumariBhandari
 
Principals of Programming in CModule -5.pdfModule_2_P2 (1).pdf
Principals of Programming in CModule -5.pdfModule_2_P2 (1).pdf
anilcsbs
 
Lbvgytftyrytfgcjhvhvvvvvvvvvvvvecture 19.pptx
Lbvgytftyrytfgcjhvhvvvvvvvvvvvvecture 19.pptx
ApoorvMalviya2
 
Chapter 4(1)
Chapter 4(1)
TejaswiB4
 
Chapter 3 branching v4
Chapter 3 branching v4
Sunarto Quek
 
6 c control statements branching &amp; jumping
6 c control statements branching &amp; jumping
MomenMostafa
 
Cs291 assignment solution
Cs291 assignment solution
Kuntal Bhowmick
 
C in 10 Hours learn programming easily.pdf.pdf
C in 10 Hours learn programming easily.pdf.pdf
eshaverma1710
 
programs of c www.eakanchha.com
programs of c www.eakanchha.com
Akanchha Agrawal
 
POP Unit 2.pptx.pdf for your time and gauss with example
POP Unit 2.pptx.pdf for your time and gauss with example
siddarameshav871
 
Ad

Recently uploaded (20)

YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
LDMMIA Shop & Student News Summer Solstice 25
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
jutaydeonne
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
IIT Kharagpur Quiz Club
 
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
 
Peer Teaching Observations During School Internship
Peer Teaching Observations During School Internship
AjayaMohanty7
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
 
June 2025 Progress Update With Board Call_In process.pptx
June 2025 Progress Update With Board Call_In process.pptx
International Society of Service Innovation Professionals
 
INDUCTIVE EFFECT slide for first prof pharamacy students
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
LDMMIA Shop & Student News Summer Solstice 25
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
jutaydeonne
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
IIT Kharagpur Quiz Club
 
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
 
Peer Teaching Observations During School Internship
Peer Teaching Observations During School Internship
AjayaMohanty7
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
 
INDUCTIVE EFFECT slide for first prof pharamacy students
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
Ad

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.............