let us c(by yashwantkanetkar) solution chapter 4 solution 5th edition
Note:- I am not an expert. I am Engineering student. So my answer may have error or mistake
Let us C (by yashvant Kanetkar) chapter 3 SolutionHazrat Bilal
All rights reserved. No part of this slide
may be reproduced, stored in a retrieval
system, or transmitted, in any form or by
any means, without the prior permission.
let us c(by yashwantkanetkar) solution chapter 4 solution 5th edition
Note:- I am not an expert. I am Engineering student. So my answer may have error or mistake
Let us C (by yashvant Kanetkar) chapter 3 SolutionHazrat Bilal
All rights reserved. No part of this slide
may be reproduced, stored in a retrieval
system, or transmitted, in any form or by
any means, without the prior permission.
Presentación para la charla sobre el libro de Robert C. Martin, Clean Code.
Esta presentación la impartí en CyLicon Valley, aquí tenéis el video con el audio de la charla => https://www.youtube.com/watch?v=1Fss1jBfc3g
This document contains some programs of C using Data structures, like Stack, LinkedList, queue, Fibonacci series, addition and multiplication of two matrices,etc.
final Year Projects, Final Year Projects in Chennai, Software Projects, Embedded Projects, Microcontrollers Projects, DSP Projects, VLSI Projects, Matlab Projects, Java Projects, .NET Projects, IEEE Projects, IEEE 2009 Projects, IEEE 2009 Projects, Software, IEEE 2009 Projects, Embedded, Software IEEE 2009 Projects, Embedded IEEE 2009 Projects, Final Year Project Titles, Final Year Project Reports, Final Year Project Review, Robotics Projects, Mechanical Projects, Electrical Projects, Power Electronics Projects, Power System Projects, Model Projects, Java Projects, J2EE Projects, Engineering Projects, Student Projects, Engineering College Projects, MCA Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, Wireless Networks Projects, Network Security Projects, Networking Projects, final year projects, ieee projects, student projects, college projects, ieee projects in chennai, java projects, software ieee projects, embedded ieee projects, "ieee2009projects", "final year projects", "ieee projects", "Engineering Projects", "Final Year Projects in Chennai", "Final year Projects at Chennai", Java Projects, ASP.NET Projects, VB.NET Projects, C# Projects, Visual C++ Projects, Matlab Projects, NS2 Projects, C Projects, Microcontroller Projects, ATMEL Projects, PIC Projects, ARM Projects, DSP Projects, VLSI Projects, FPGA Projects, CPLD Projects, Power Electronics Projects, Electrical Projects, Robotics Projects, Solor Projects, MEMS Projects, J2EE Projects, J2ME Projects, AJAX Projects, Structs Projects, EJB Projects, Real Time Projects, Live Projects, Student Projects, Engineering Projects, MCA Projects, MBA Projects, College Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, M.Sc Projects, Final Year Java Projects, Final Year ASP.NET Projects, Final Year VB.NET Projects, Final Year C# Projects, Final Year Visual C++ Projects, Final Year Matlab Projects, Final Year NS2 Projects, Final Year C Projects, Final Year Microcontroller Projects, Final Year ATMEL Projects, Final Year PIC Projects, Final Year ARM Projects, Final Year DSP Projects, Final Year VLSI Projects, Final Year FPGA Projects, Final Year CPLD Projects, Final Year Power Electronics Projects, Final Year Electrical Projects, Final Year Robotics Projects, Final Year Solor Projects, Final Year MEMS Projects, Final Year J2EE Projects, Final Year J2ME Projects, Final Year AJAX Projects, Final Year Structs Projects, Final Year EJB Projects, Final Year Real Time Projects, Final Year Live Projects, Final Year Student Projects, Final Year Engineering Projects, Final Year MCA Projects, Final Year MBA Projects, Final Year College Projects, Final Year BE Projects, Final Year BTech Projects, Final Year ME Projects, Final Year MTech Projects, Final Year M.Sc Projects, IEEE Java Projects, ASP.NET Projects, VB.NET Projects, C# Projects, Visual C++ Projects, Matlab Projects, NS2 Projects, C Projects, Microcontroller Projects, ATMEL Projects, PIC Projects, ARM Projects, DSP Projects, VLSI Projects, FPGA Projects, CPLD Projects, Power Electronics Projects, Electrical Projects, Robotics Projects, Solor Projects, MEMS Projects, J2EE Projects, J2ME Projects, AJAX Projects, Structs Projects, EJB Projects, Real Time Projects, Live Projects, Student Projects, Engineering Projects, MCA Projects, MBA Projects, College Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, M.Sc Projects, IEEE 2009 Java Projects, IEEE 2009 ASP.NET Projects, IEEE 2009 VB.NET Projects, IEEE 2009 C# Projects, IEEE 2009 Visual C++ Projects, IEEE 2009 Matlab Projects, IEEE 2009 NS2 Projects, IEEE 2009 C Projects, IEEE 2009 Microcontroller Projects, IEEE 2009 ATMEL Projects, IEEE 2009 PIC Projects, IEEE 2009 ARM Projects, IEEE 2009 DSP Projects, IEEE 2009 VLSI Projects, IEEE 2009 FPGA Projects, IEEE 2009 CPLD Projects, IEEE 2009 Power Electronics Projects, IEEE 2009 Electrical Projects, IEEE 2009 Robotics Projects, IEEE 2009 Solor Projects, IEEE 2009 MEMS Projects, IEEE 2009 J2EE P
Presentación para la charla sobre el libro de Robert C. Martin, Clean Code.
Esta presentación la impartí en CyLicon Valley, aquí tenéis el video con el audio de la charla => https://www.youtube.com/watch?v=1Fss1jBfc3g
This document contains some programs of C using Data structures, like Stack, LinkedList, queue, Fibonacci series, addition and multiplication of two matrices,etc.
final Year Projects, Final Year Projects in Chennai, Software Projects, Embedded Projects, Microcontrollers Projects, DSP Projects, VLSI Projects, Matlab Projects, Java Projects, .NET Projects, IEEE Projects, IEEE 2009 Projects, IEEE 2009 Projects, Software, IEEE 2009 Projects, Embedded, Software IEEE 2009 Projects, Embedded IEEE 2009 Projects, Final Year Project Titles, Final Year Project Reports, Final Year Project Review, Robotics Projects, Mechanical Projects, Electrical Projects, Power Electronics Projects, Power System Projects, Model Projects, Java Projects, J2EE Projects, Engineering Projects, Student Projects, Engineering College Projects, MCA Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, Wireless Networks Projects, Network Security Projects, Networking Projects, final year projects, ieee projects, student projects, college projects, ieee projects in chennai, java projects, software ieee projects, embedded ieee projects, "ieee2009projects", "final year projects", "ieee projects", "Engineering Projects", "Final Year Projects in Chennai", "Final year Projects at Chennai", Java Projects, ASP.NET Projects, VB.NET Projects, C# Projects, Visual C++ Projects, Matlab Projects, NS2 Projects, C Projects, Microcontroller Projects, ATMEL Projects, PIC Projects, ARM Projects, DSP Projects, VLSI Projects, FPGA Projects, CPLD Projects, Power Electronics Projects, Electrical Projects, Robotics Projects, Solor Projects, MEMS Projects, J2EE Projects, J2ME Projects, AJAX Projects, Structs Projects, EJB Projects, Real Time Projects, Live Projects, Student Projects, Engineering Projects, MCA Projects, MBA Projects, College Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, M.Sc Projects, Final Year Java Projects, Final Year ASP.NET Projects, Final Year VB.NET Projects, Final Year C# Projects, Final Year Visual C++ Projects, Final Year Matlab Projects, Final Year NS2 Projects, Final Year C Projects, Final Year Microcontroller Projects, Final Year ATMEL Projects, Final Year PIC Projects, Final Year ARM Projects, Final Year DSP Projects, Final Year VLSI Projects, Final Year FPGA Projects, Final Year CPLD Projects, Final Year Power Electronics Projects, Final Year Electrical Projects, Final Year Robotics Projects, Final Year Solor Projects, Final Year MEMS Projects, Final Year J2EE Projects, Final Year J2ME Projects, Final Year AJAX Projects, Final Year Structs Projects, Final Year EJB Projects, Final Year Real Time Projects, Final Year Live Projects, Final Year Student Projects, Final Year Engineering Projects, Final Year MCA Projects, Final Year MBA Projects, Final Year College Projects, Final Year BE Projects, Final Year BTech Projects, Final Year ME Projects, Final Year MTech Projects, Final Year M.Sc Projects, IEEE Java Projects, ASP.NET Projects, VB.NET Projects, C# Projects, Visual C++ Projects, Matlab Projects, NS2 Projects, C Projects, Microcontroller Projects, ATMEL Projects, PIC Projects, ARM Projects, DSP Projects, VLSI Projects, FPGA Projects, CPLD Projects, Power Electronics Projects, Electrical Projects, Robotics Projects, Solor Projects, MEMS Projects, J2EE Projects, J2ME Projects, AJAX Projects, Structs Projects, EJB Projects, Real Time Projects, Live Projects, Student Projects, Engineering Projects, MCA Projects, MBA Projects, College Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, M.Sc Projects, IEEE 2009 Java Projects, IEEE 2009 ASP.NET Projects, IEEE 2009 VB.NET Projects, IEEE 2009 C# Projects, IEEE 2009 Visual C++ Projects, IEEE 2009 Matlab Projects, IEEE 2009 NS2 Projects, IEEE 2009 C Projects, IEEE 2009 Microcontroller Projects, IEEE 2009 ATMEL Projects, IEEE 2009 PIC Projects, IEEE 2009 ARM Projects, IEEE 2009 DSP Projects, IEEE 2009 VLSI Projects, IEEE 2009 FPGA Projects, IEEE 2009 CPLD Projects, IEEE 2009 Power Electronics Projects, IEEE 2009 Electrical Projects, IEEE 2009 Robotics Projects, IEEE 2009 Solor Projects, IEEE 2009 MEMS Projects, IEEE 2009 J2EE P
What is the distance between the points B and C Experience Tradition/tutorial...pinck3124
FOR MORE CLASSES VISIT
www.tutorialoutlet.com
This paper is part of an examination of the College counting towards the award of a degree.
Examinations are governed by the College Regulations under the authority of the Academic Board.
final Year Projects, Final Year Projects in Chennai, Software Projects, Embedded Projects, Microcontrollers Projects, DSP Projects, VLSI Projects, Matlab Projects, Java Projects, .NET Projects, IEEE Projects, IEEE 2009 Projects, IEEE 2009 Projects, Software, IEEE 2009 Projects, Embedded, Software IEEE 2009 Projects, Embedded IEEE 2009 Projects, Final Year Project Titles, Final Year Project Reports, Final Year Project Review, Robotics Projects, Mechanical Projects, Electrical Projects, Power Electronics Projects, Power System Projects, Model Projects, Java Projects, J2EE Projects, Engineering Projects, Student Projects, Engineering College Projects, MCA Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, Wireless Networks Projects, Network Security Projects, Networking Projects, final year projects, ieee projects, student projects, college projects, ieee projects in chennai, java projects, software ieee projects, embedded ieee projects, "ieee2009projects", "final year projects", "ieee projects", "Engineering Projects", "Final Year Projects in Chennai", "Final year Projects at Chennai", Java Projects, ASP.NET Projects, VB.NET Projects, C# Projects, Visual C++ Projects, Matlab Projects, NS2 Projects, C Projects, Microcontroller Projects, ATMEL Projects, PIC Projects, ARM Projects, DSP Projects, VLSI Projects, FPGA Projects, CPLD Projects, Power Electronics Projects, Electrical Projects, Robotics Projects, Solor Projects, MEMS Projects, J2EE Projects, J2ME Projects, AJAX Projects, Structs Projects, EJB Projects, Real Time Projects, Live Projects, Student Projects, Engineering Projects, MCA Projects, MBA Projects, College Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, M.Sc Projects, Final Year Java Projects, Final Year ASP.NET Projects, Final Year VB.NET Projects, Final Year C# Projects, Final Year Visual C++ Projects, Final Year Matlab Projects, Final Year NS2 Projects, Final Year C Projects, Final Year Microcontroller Projects, Final Year ATMEL Projects, Final Year PIC Projects, Final Year ARM Projects, Final Year DSP Projects, Final Year VLSI Projects, Final Year FPGA Projects, Final Year CPLD Projects, Final Year Power Electronics Projects, Final Year Electrical Projects, Final Year Robotics Projects, Final Year Solor Projects, Final Year MEMS Projects, Final Year J2EE Projects, Final Year J2ME Projects, Final Year AJAX Projects, Final Year Structs Projects, Final Year EJB Projects, Final Year Real Time Projects, Final Year Live Projects, Final Year Student Projects, Final Year Engineering Projects, Final Year MCA Projects, Final Year MBA Projects, Final Year College Projects, Final Year BE Projects, Final Year BTech Projects, Final Year ME Projects, Final Year MTech Projects, Final Year M.Sc Projects, IEEE Java Projects, ASP.NET Projects, VB.NET Projects, C# Projects, Visual C++ Projects, Matlab Projects, NS2 Projects, C Projects, Microcontroller Projects, ATMEL Projects, PIC Projects, ARM Projects, DSP Projects, VLSI Projects, FPGA Projects, CPLD Projects, Power Electronics Projects, Electrical Projects, Robotics Projects, Solor Projects, MEMS Projects, J2EE Projects, J2ME Projects, AJAX Projects, Structs Projects, EJB Projects, Real Time Projects, Live Projects, Student Projects, Engineering Projects, MCA Projects, MBA Projects, College Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, M.Sc Projects, IEEE 2009 Java Projects, IEEE 2009 ASP.NET Projects, IEEE 2009 VB.NET Projects, IEEE 2009 C# Projects, IEEE 2009 Visual C++ Projects, IEEE 2009 Matlab Projects, IEEE 2009 NS2 Projects, IEEE 2009 C Projects, IEEE 2009 Microcontroller Projects, IEEE 2009 ATMEL Projects, IEEE 2009 PIC Projects, IEEE 2009 ARM Projects, IEEE 2009 DSP Projects, IEEE 2009 VLSI Projects, IEEE 2009 FPGA Projects, IEEE 2009 CPLD Projects, IEEE 2009 Power Electronics Projects, IEEE 2009 Electrical Projects, IEEE 2009 Robotics Projects, IEEE 2009 Solor Projects, IEEE 2009 MEMS Projects, IEEE 2009 J2EE P
The simplified electron and muon model, Oscillating Spacetime: The Foundation...RitikBhardwaj56
Discover the Simplified Electron and Muon Model: A New Wave-Based Approach to Understanding Particles delves into a groundbreaking theory that presents electrons and muons as rotating soliton waves within oscillating spacetime. Geared towards students, researchers, and science buffs, this book breaks down complex ideas into simple explanations. It covers topics such as electron waves, temporal dynamics, and the implications of this model on particle physics. With clear illustrations and easy-to-follow explanations, readers will gain a new outlook on the universe's fundamental nature.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
Delivering Micro-Credentials in Technical and Vocational Education and TrainingAG2 Design
Explore how micro-credentials are transforming Technical and Vocational Education and Training (TVET) with this comprehensive slide deck. Discover what micro-credentials are, their importance in TVET, the advantages they offer, and the insights from industry experts. Additionally, learn about the top software applications available for creating and managing micro-credentials. This presentation also includes valuable resources and a discussion on the future of these specialised certifications.
For more detailed information on delivering micro-credentials in TVET, visit this https://tvettrainer.com/delivering-micro-credentials-in-tvet/
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
How to Build a Module in Odoo 17 Using the Scaffold MethodCeline George
Odoo provides an option for creating a module by using a single line command. By using this command the user can make a whole structure of a module. It is very easy for a beginner to make a module. There is no need to make each file manually. This slide will show how to create a module using the scaffold method.
How to Build a Module in Odoo 17 Using the Scaffold Method
LET US C (5th EDITION) CHAPTER 1 ANSWERS
1. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
(A)Which of these variables are valid and which are not? Why?
BASICSALARY-valid
_basic-valid
basic-hra-no special symbol except a underscore is allowed
#MEANno -special symbol except a underscore is allowed
group. -no special symbol except a underscore is allowed
422-a variable cannot start with a number
population in 2006-a variable cannot have spaces
over time-a variable cannot have spaces
mindovermatter-valid
FLOAT-a variable cannot be a key word
hELLO -valid
queue.-no special symbol except a underscore is allowed
team’svictory- no special symbol except a underscore is allowed
Plot # 3-no special symbol except a underscore is allowed
2015_Dday-a variable cannot start with a number
(B) Point out any errors in the following C statements. If any:
(a) int = 314.562 * 150 ;-no error
(b) name = ‘Ajay’ ;-no error
(c) varchar = ‘3’ ; - no inverted commas are required
(d) 3.14 * r * r * h = vol_of_cyl ;-no error
(e) k = ( a * b ) ( c + ( 2.5a + b ) ( d + e ) ; - a * should be added between two brackets
(f) m_inst = rate of interest * amount in rs ;-no error
(g) si = principal * rateofinterest * numberofyears / 100 ;-no error
(h) area = 3.14 * r ** 2 ; - there is no arithmetic operator such as **
(i) volume = 3.14 * r ^ 2 * h ; - there is no arithmetic opertor such as ^
(j) k = ( (a * b ) + c ) ( 2.5 * a + b ) ; - a * should be added between two brackets
(k) a = b = 3 = 4 ; - 3 and 4 are not equal
(l) count = count + 1 ;-no error
(m) date = '2 Mar 04' ; -no error
(C) Evaluate the following expressions and show their hierarchy.
(a) g = big / 2 + big * 4 / big - big + abc / 3 ;
(abc = 2.5, big = 2, assume g to be a float)
Ans) g = 2/2 + 2*4/2 - 2 + 2.5/3
g = 1 + 4/2 - 2 + 2.5/3 (DIVISION)
g = 1 + 2 - 2 + 2.5/3 (MULTIPLICATION)
g = 1 + 2 - 2 + 0.83 (DIVISION)
g = 3 - 2 + 0.83 (ADDITION)
g = 1 + 0.83 (SUBTRACTION)
g = 1.83 (ADDITION)
(b) on = ink * act / 2 + 3 / 2 * act + 2 + tig ;
(ink = 4, act = 1, tig = 3.2, assume on to be an int)
Ans) on = 4*1/2 + 3/2*1 + 2 + 3.2
on = 4/2 + 3/2*1 + 2 + 3.2 (MULTIPLICATION)
on = 2 + 3/2*1 + 2 + 3.2 (DIVISION)
2. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
on = 2 + 1*1 + 2 + 3.2 (DIVISION)
on = 2 + 1 + 2 + 3.2 (MULTIPLICATION)
on = 3 + 2 + 3.2 (ADDITION)
on = 5 + 3.2 (ADDITION)
on = 8 (ADDITION)
(c) s = qui * add / 4 - 6 / 2 + 2 / 3 * 6 / god ;
(qui = 4, add = 2, god = 2, assume s to be an int)
Ans) s = 4/2*2/4 - 6/2 + 2/3*6/2
s = 2*2/4 - 6/2 + 2/3*6/2 (DIVISION)
s = 4/4 - 6/2 + 2/3*6/2 (MULTIPLICATION)
s = 1 - 6/2 + 2/3*6/2 (DIVISION)
s = 1 - 3 + 2/3*6/2 (DIVISION)
s = 1 - 3 + 0*6/2 (DIVISION)
s = 1 - 3 + 0/2 (MULTIPLICATION)
s = 1 - 3 + 0 (DIVISION)
s = -2 + 0 (SUBTRACTION)
s = -2 (ADDITION)
(d) s = 1 / 3 * a / 4 - 6 / 2 + 2 / 3 * 6 / g ;
(a = 4, g = 3, assume s to be an int)
Ans) s = 1/3*4/4 - 6/3 + 2/3*6/3
s = 0*4/4 - 6/3 + 2/3 *6/3 (DIVISION)
s = 0/4 - 6/3 + 2/3*6/3 (MULTIPLICATION)
s = 0 - 6/3 + 2/3*6/3 (DIVISION)
s = 0 - 2 + 2/3*6/3 (DIVISION)
s = 0 - 2 + 0*6/3 (DIVISION)
s = 0 - 2 + 0/3 (MULTIPLICATION)
s = 0 - 2 + 0 (DIVISION)
s = -2 + 0 (SUBTRACTION)
s = -2 (ADDITION)
[D] Fill the following table for the expressions given below and then evaluate the result. A sample
entry has been filled in the table for expression.
Expression Operator Left Right Remark
(a) g = 10 / 5 /2 / 1
;
= a 1 or 10/5/2/1 Left operand is
unambiguous, and right
side is not
(b) b = 3 / 2 + 5 * 4
/ 3 ;
= b 7 or 3/2 + 5*4/3 Left operand is
unambiguous, and right
side is not
(c) a = b = c = 3 + 4
;
= c or a=b=c 7 or 3 + 4 Both the sides are not
unambiguous
[E] Convert the following equations into corresponding C statements
(a) Z = 8.8(a + b)2/c - 0.5 + 2a/(q + r)
(a + b) * (l/m)
Ans) Z = (8.8*(a + b)*2/c - 0.5 + (2*a)/(q + r))/((a + b)*(l/m)
3. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
(b) X = -b + (b*b) + 2 4ac
2a
Ans) X = (-b + (b*b) + 2*4*a*c)/(2*a)
(c) R = 2v + 6.22(c + d)
g + v
Ans) R = (2*v + 6(c+d))/(g + v)
(d) A = (7.7b (xy + a)/c - 0.8 + 2b
(x+y) (1/y)
Ans) A = (7.7*b*(x*y + a)/c - 0.8 + 2*b)/((x + y)*(1/y))
[F] What would be the output of the following programs:
(a) main( )
{
int i = 2, j = 3, k, l ;
float a, b ;
k = i / j * j ;
l = j / i * i ;
a = i / j * j ;
b = j / i * i ;
printf( "%d %d %f %f", k, l, a, b ) ;
}
Ans) 0 2 0.000000 2.000000
(b) main( )
{
int a, b ;
a = -3 - - 3 ;
b = -3 - - ( - 3 ) ;
printf ( "a = %d b = %d", a, b ) ;
}
Ans) a = 0 b = -6
(c) main( )
{
float a = 5, b = 2 ;
int c ;
c = a % b ;
printf ( "%d", c ) ;
}
Ans) error: invalid operands to binary % (have ‘float’ and ‘float’)
c = a % b ;
4. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
(d) main( )
{
printf ( "nn nn nnn" ) ;
printf ( "nn /n/n nn/n" ) ;
}
Ans) nn
nn nn/n/n nn/n
(e) main( )
{
int a, b ;
printf ( "Enter values of a and b" ) ;
scanf ( " %d %d ", &a, &b ) ;
printf ( "a = %d b = %d", a, b ) ;
}
Ans) Enter the values of a and b: 1 and 2
a = 1 b = 2
(f) main( )
{
int p, q ;
printf ( "Enter values of p and q" ) ;
scanf ( " %d %d ", p, q ) ;
printf ( "p = %d q =%d", p, q ) ;
}
Ans) Enter the values of p and q
Segmentation fault (Core dumped)
[G] Pick up the correct alternative for each of the following questions (Highlighted are the correct
answers):
(a) C language has been developed by
(1) Ken Thompson
(2) Dennis Ritchie
(3) Peter Norton
(4) Martin Richards
(b) C can be used on
(1) Only MS-DOS operating system
(2) Only Linux operating system
(3) Only Windows operating system
(4) All the above
(c) C programs are converted into machine language with the help of
(1) An Editor
(2) A compiler
(3) An operating system
(4) None of the above
(d) The real constant in C can be expressed in which of the following forms
5. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
(1) Fractional form only
(2) Exponential form only
(3) ASCII form only
(4) Both fractional and exponential forms
(e) A character variable can at a time store
(1) 1 character
(2) 8 characters
(3) 254 characters
(4) None of the above
(f) The statement char ch = ‘Z’ would store in ch
(1) The character Z
(2) ASCII value of Z
(3) Z along with the single inverted commas
(4) Both (1) and (2)
(g) Which of the following is NOT a character constant
(1) ‘Thank You’
(2) ‘Enter values of P, N, R’
(3) ‘23.56E-03’
(4) All the above
(h) The maximum value that an integer constant can have is
(1) -32767
(2) 32767
(3) 1.7014e+38
(4) –1.7014e+38
(i) A C variable cannot start with
(1) An alphabet
(2) A number
(3) A special symbol other than underscore
(4) Both (2) & (3) above
(j) Which of the following statement is wrong
(1) mes = 123.56 ;
(2) con = 'T' * 'A' ;
(3) this = 'T' * 20 ;
(4) 3 + a = b ;
(k) Which of the following shows the correct hierarchy of arithmetic operators in C
(1) **, * or /, + or -
(2) **, *, /, +, -
(3) **, /, *, +, -
(4) / or *, - or +
(l) In b = 6.6 / a + 2 * n ; which operation will be performed first?
(1) 6.6 / a
(2) a + 2
(3) 2 * n
6. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
(4) Depends upon compiler
(m) Which of the following is allowed in a C Arithmetic instruction
(1) [ ]
(2) { }
(3) ( )
(4) None of the above
(n) Which of the following statements is false
(1) Each new C instruction has to be written on a separate line
(2) Usually all C statements are entered in small case letters
(3) Blank spaces may be inserted between two words in a C statement
(4) Blank spaces cannot be inserted within a variable name
(o) If a is an integer variable, a = 5 / 2 ; will return a value
(1) 2.5
(2) 3
(3) 2
(4) 0
(p) The expression, a = 7 / 22 * ( 3.14 + 2 ) * 3 / 5 ; evaluates to
(1) 8.28
(2) 6.28
(3) 3.14
(4) 0
(q) The expression, a = 30 * 1000 + 2768 ; evaluates to
(1) 32768
(2) -32768
(3) 113040
(4) 0
(r) The expression x = 4 + 2 % - 8 evaluates to
(1) -6
(2) 6
(3) 4
(4) None of the above
(s) Hierarchy decides which operator
(1) is most important
(2) is used first
(3) is fastest
(4) operates on largest numbers
(t) An integer constant in C must have:
(1) At least one digit
(2) Atleast one decimal point
(3) A comma along with digits
(4) Digits separated by commas
(u) A character variable can never store more than
7. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
(1) 32 characters
(2) 8 characters
(3) 254 characters
(4) 1 character
(v) In C a variable cannot contain
(1) Blank spaces
(2) Hyphen
(3) Decimal point
(4) All the above
(w) Which of the following is FALSE in C
(1) Keywords can be used as variable names
(2) Variable names can contain a digit
(3) Variable names do not contain a blank space
(4) Capital letters can be used in variable names
(x) In C, Arithmetic instruction cannot contain
(1) variables
(2) constants
(3) variable names on right side of =
(4) constants on left side of =
(y) Which of the following shows the correct hierarchy of arithmetic operations in C
(1) / + * -
(2) * - / +
(3) + - / *
(4) * / + -
(z) What will be the value of d if d is a float after the operation d = 2 / 7.0?
(1) 0
(2) 0.2857
(3) Cannot be determined
(4) None of the above
[H] Write C programs for the following:
(a) Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic
salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.
#include <stdio.h>
int main()
{
float basic_sal = 0;
printf("Enter the basic salary:");
scanf("%f",&basic_sal);
float DA = 0;
DA = basic_sal*40/100;
float HRA = 0;
HRA = basic_sal*20/100;
float gross_sal = 0;
gross_sal = basic_sal + DA + HRA;
8. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
printf("The gross salary is:%f+%f+%f=%f",basic_sal,DA,HRA,gross_sal);
return 0;
}
(b) The distance between two cities (in km.) is input through the keyboard. Write a program to
convert and print this distance in meters, feet, inches and centimeters.
#include <stdio.h>
int main()
{
float dis_in_km = 0;
printf("Enter the distance in kms:");
scanf("%f",&dis_in_km);
float dis_in_cm = 0;
dis_in_cm = dis_in_km*100000;
float dis_in_m = 0;
dis_in_m = dis_in_km*1000;
float dis_in_foot = 0;
dis_in_foot = dis_in_km*3281;
float dis_in_inches = 0;
dis_in_inches = dis_in_km*39370;
printf("The distance in centimeteres = %fn",dis_in_cm);
printf("The distance in meteres = %fn",dis_in_m);
printf("The distance in inches = %fn",dis_in_inches);
printf("The distance in feet = %fn",dis_in_foot);
return 0;
}
(c) If the marks obtained by a student in five different subjects are input through the keyboard, find
out the aggregate marks and percentage marks obtained by the student. Assume that the maximum
marks that can be obtained by a student in each subject is 100.
#include <stdio.h>
int main()
{
float mark1,mark2,mark3,mark4,mark5;
printf("Enter the marks of the 5 subjects:");
scanf("%f,%f,%f,%f,%f",&mark1,&mark2,&mark3,&mark4,&mark5);
float average_of_marks;
average_of_marks = (mark1+mark2+mark3+mark4+mark5)/5;
float per_of_marks;
per_of_marks = (mark1+mark2+mark3+mark4+mark5)/500*100;
printf("The average of marks is:%fn",average_of_marks);
printf("The percentage of marks is%fn",per_of_marks);
}
(d) Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to
convert this temperature into Centigrade degrees.
#include <stdio.h>
int main()
9. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
{
float temp_in_far;
printf("Enter the temperature in farenheit:");
scanf("%f",&temp_in_far);
float temp_in_cel1;
temp_in_cel1 = temp_in_far-32;
float temp_in_cel2;
temp_in_cel2 = temp_in_cel1/9;
float temp_in_cel3;
temp_in_cel3 = temp_in_cel2*5;
printf("The temperature in celsius is: %f",temp_in_cel3);
}
(e) The length & breadth of a rectangle and radius of a circle are input through the keyboard. Write a
program to calculate the area & perimeter of the rectangle, and the area & circumference of the
circle.
#include <stdio.h>
int main()
{
float length,breadth,radius;
printf("Enter the length of the rectangle:");
scanf("%f",&length);
printf("Enter the breadth of the rectangle:");
scanf("%f",&breadth);
printf("Enter the radius of the circle:");
scanf("%f",&radius);
float area_of_rect,peri_of_rect,area_of_circle,circum_of_circle;
area_of_rect = length*breadth;
peri_of_rect = 2*(length + breadth);
area_of_circle = 22*radius*radius/7;
circum_of_circle = 2*22*radius/7;
printf("The area of the rectangle = %fn",area_of_rect);
printf("The perimeter of the rectangle = %fn",peri_of_rect);
printf("The circumference of the circle = %fn",circum_of_circle);
printf("The area of the circle = %fn",area_of_circle);
return 0;
}
(f) Two numbers are input through the keyboard into two locations C and D. Write a program to
interchange the contents of C and D.
#include <stdio.h>
int main()
{
int c,d;
printf("Enter the value of c:");
scanf("%d",&c);
printf("Enter the value of d:");
scanf("%d",&d);
c = c+d;
10. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
d = c-d;
c = c-d;
printf("After interchanging the values of c and d we have c = %d and d = %d",c,d);
return 0;
}
(g) If a five-digit number is input through the keyboard, write a program to calculate the sum of its
digits.
(Hint: Use the modulus operator ‘%’)
#include <stdio.h>
int main()
{
int num,sum,a,b,c,d,e,d1,d2,d3,d4,d5;
printf("Enter any five digit number: ");
scanf("%d",&num);
a = num/10;
d5 = num%10;
b = a/10;
d4 = a%10;
c = b/10;
d3 = b%10;
d = c/10;
d2 = c%10;
e = d/10;
d1 = d%10;
sum = d1 + d2 + d3 + d4 + d5;
printf("The sum of the digits of the five-digit number you had entered is: %d",sum);
return 0;
}
(h) If a five-digit number is input through the keyboard, write a program to reverse the number.
#include <stdio.h>
int main()
{
int num,reversed_num,a,b,c,d,e,d1,d2,d3,d4,d5;
printf("Enter any five digit number: ");
scanf("%d",&num);
a = num/10;
d5 = num%10;
b = a/10;
d4 = a%10;
c = b/10;
d3 = b%10;
d = c/10;
d2 = c%10;
e = d/10;
d1 = d%10;
reversed_num = (d5*10000) + (d4*1000) + (d3*100) + (d2*10) + (d1*1);
11. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
printf("The sum of the reversed digits of the five-digit number you had entered is:
%d",reversed_num);
return 0;
}
(i) If a four-digit number is input through the keyboard, write a program to obtain the sum of the
first and last digit of this number.
#include <stdio.h>
int main()
{
int num,sum,a,b,c,d,d1,d2,d3,d4;
printf("Enter any five digit number: ");
scanf("%d",&num);
a = num/10;
d4 = num%10;
b = a/10;
d3 = a%10;
c = b/10;
d2 = b%10;
d = c/10;
d1 = c%10;
sum = d4 + d1;
printf("The sum of the first and last digits of the four-digit number you had entered is: %d",sum);
return 0;
}
(j) In a town, the percentage of men is 52. The percentage of total literacy is 48. If total percentage
of literate men is 35 of the total population, write a program to find the total number
of illiterate men and women if the population of the town is 80,000.
#include <stdio.h>
int main()
{
int
total_pop,illiterate_men,illiterate_women,literate_men,literate_women,per_of_men,total_literacy,
women;
printf("Enter the total population of the area:");
scanf("%d",&total_pop);
printf("Enter the percentage of men:");
scanf("%d",&per_of_men);
printf("Enter the percentage of total literacy:");
scanf("%d",&total_literacy);
printf("Enter the percentage of literate men:");
scanf("%d",&literate_men);
illiterate_men = per_of_men-literate_men;
illiterate_men = total_pop*illiterate_men/100;
literate_women = total_literacy - literate_men;
women = 100 - per_of_men;
12. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
illiterate_women = women - literate_women;
illiterate_women = total_pop*illiterate_women/100;
printf("The number of illiterate men = %d ",illiterate_men);
printf("The number of illiterate women = %d ",illiterate_women);
return 0;
}
(k) A cashier has currency notes of denominations 10, 50 and 100. If the amount to be withdrawn is
input through the keyboard in hundreds, find the total number of currency notes of each
denomination the cashier will have to give to the withdrawer.
#include <stdio.h>
int main()
{
int amount;
printf("Please enter the amount to be withdrawen:");
scanf("%d",&amount);
int notes_100,notes_50,notes_10,notes_left;
notes_100 = amount / 100;
notes_50 = (amount % 100) / 50;
notes_10 = ((amount % 100) % 50) / 10;
notes_left = (((amount % 100) % 50) % 10);
printf("The number of rupee 100 notes to be withdrawen are: %dn",notes_100);
printf("The number of rupee 50 notes to be withdrawen are: %dn",notes_50);
printf("The number of rupee 10 notes to be withdrawen are: %dn",notes_10);
printf("The value of money left is: %dn",notes_left);
return 0;
}
(l) If the total selling price of 15 items and the total profit earned on them is input through the
keyboard, write a program to find the cost price of one item.
#include <stdio.h>
int main()
{
float sp,gain,cp;
printf("Enter the sp of 15 items:");
scanf("%f",&sp);
printf("Enter the gain :");
scanf("%f",&gain);
cp = (sp-gain)/15;
printf("The cp of the 15 items = %f",cp);
return 0;
}
(m) If a five-digit number is input through the keyboard, write a program to print a new number by
adding one to each of its digits. For example if the number that is input is 12391 then the output
should be displayed as 23402
#include <stdio.h>
int main()
13. LET US C (5th
EDITION) QUESTIONS AND ANSWERS
BY-KAVYA SHARMA
{
int a,b,c,d,e,f,n,sum;
printf("Enter a five digit numbern");
scanf("%d",&n);
a=((n%10)+1)%10;
f=n/10;
b=((f%10)+1)%10;
f=f/10;
c=((f%10)+1)%10;
f=f/10;
d=((f%10)+1)%10;
f=f/10;
e=((f%10)+1)%10;
f=f/10;
sum = (e*10000) + (d*1000) + (c*100) + (b*10) + (a*1);
printf("Result is %d",sum);
return 0;
}