Semester : S1 and S2
Subject : Computer Programming
Year : 2020
Term : APRIL
Branch : BIOTECHNOLOGY
Scheme : 2015 Full Time
Course Code : CS 100
Page:2
Ai سی ನಾರ್
rapes: 3
E £2803 Pap
13 What are tunetion prototypes? |५ Function prototype mandatory for every user (2) :
detined function in CY Justify your answer lying (2 ஆ
14 Write a ( program to find the largest among three வய numbers, by applyiny இ ۸
conditional operator 2
15 How constants are defined in (' programs, ۰۷۶ 0
lo Write a ( ` program to findsum of digits in an integer. (4) ۱
PART B
Answer any 4 full questions, each carries & marks,
17 (ھ For the declaration int pol, qel, ॥[25|51 | |, 51125 { {11}; , check the validity of = (>)
the given pointer usages and if valid provide the value of the statement Support ⋅
your answer with proper explanation. 2
1) ^ ii) &(p+q) 111) *(&p) 1൦) *2017 ೪) *5[0]
0) What will be the output of the following code’ Justify your answer. (೨)
#include
void main()
{
char s1{30]="2017 15 prime",*s2:
s2=sl;
*S24=1;
s2+=2;
printi('\n%s",s2);}
18 ६) With suitable example explain different function parameter passing methods in C. (5)
b) Write a C program to find the length of a given string recursively,withoul using (3)
any standard string library function.
19 Explain the working of loop control statements in C with examples. (8) 1
20 a) What will be the output of mystery(4096,128) for the following code? I:xplainwhy ردص =
9 ہیں |
void mystery(int A, int 0) =
ர் ہہ
1 =
count=0; =
while(A>B) { A = A - ಡಿ; count++;} =
while(B>A) ) B = 8 - A; count++;} =
printf(“%d”, count); =
} لے
b) Explain switch construct with example. (2) =
८) What will be the output of the following code snippet? (3) दत
int x=1; كل
switch(x) =)
ದಾ
case 0: [0111116 "८0०" ); =
case 1: [11111 "1८" ); =
default: printf( "Not allowed in binary” ); =
ट
2 a) Explain with example, how break and continue constructs are useful in C (5) 2 र
programming. 3 ⋅
رط Ifthe following code is supposed to print first 100 positive integers, which are not (3) ~
multiple of 3, fill Line] and Line2 with suitable C programming statement. Justity i
your answer. =
ಜಿ
்
Page 2 of 3 1ے
3
=
५३
Scanned by CamScanner