Adobe Scan Dec 12, 2023
Adobe Scan Dec 12, 2023
VIDYAVARDHAKACOLLEGE OF ENGINEERING
Technological Untversity, Belagavi
Autonom¡us Instiutr, A!fNliated to Visvesvraya
Gokulam 3r Stage, Mysuru 570 002
Second Semester B.E. Examinations: September/0ctober-z023
Introduction to CProgramming Max. Mai
Duration: 3 Hour
INSTRUCTION TO STUDENTS
1) Answer One Fullquestion from each module.
2) Each module carries 20 marks.
Q.No Module-|
Marks BI
7 Li
1 (a) Write an algorithm anddraw the lowchart tofind the area of a circle.
6 L2
1 (b)| Explain the logical operators in 'C' with suitable example.
7 L3
1(<) Develop a CProgramto caleulate Area and Perimeter of a Rectangle.
Module-II
L2
2 (a) 1llustrate if-else and if-else-if statements in 'C" with its syntax.
6 L3
2(b) Write a Cprogram to find the factorial of a number 'N' using for loop. L3
7
2(c) Develop a CProgram for arithmetic operations using switch-case() statement.
OR
7 L2
3 (a) Explain while and do-while statementsin Cwith its syntax.
6 L3
|3(b) Write a CProgram to check whether a person is eligible to Vote or not.
7 L3
3 (c) Develop aCprogram to print the following pattern using nested loop.
Module-II
4 (a)l Explain declaration and initialization of 1D and 2D array with syntax and L2
example. 7
4 (b) For the given array a (7], find an element '55' in the given array by using 8 L3
linear search and print whether the element is searched successfully or
unsuccessfully.
30 35 50 55 65 75 85
1
hon 8
6 (c) For the given below funtion, complete the codetofind factorial of the
compete
negative integer.
int fact(arguments)
n'fact(n-1)
Module-y
7
7(a) Discuss the following in strnngrnanipulation function in 'C with syntax.
()strcmp()
(i) strcpy0
( )strlen)
7(b) Assume Mr. Dhanush. Mis studying in your chass.
Devetop a C Program to
read and print his academic performance in TE:ST using structure. (Assumne
structure members suitabBy)
7(c) Develop a Cpeogram o voxatenate the given two
"Wortd' and dasplay the resuit sn str3 without strings: stri: "Hello" str2
using string functao.
End..