Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

C Language Ques Paper-2k17 UIET, Knp, Exams of Computer Programming

This document contains question paper and command prompt commands list of UIET, Kanpur, Information Technology or Computer Science Department of engineering

Typology: Exams

2016/2017

Uploaded on 01/19/2022

succour
succour 🇮🇳

4.5

(12)

63 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
END
SEMESTER
EXAMINATION
UIET,
CSJM
University,
Kanpur
Department
-
IT
Semester
- I
Subject
-
Programming
and
Computing
using
C
([SC-S
tot)
Time-
3:00
hours
Max.
Marks-40
SECTIOl\
A
· Q l.
Write
a C
Program
to
read
the
information
i.e.
name
,
id
and
salary of n
emp
loy
ee
s
from
the
keyboard
and
write
it
to
a
file
. I 4 I
Q2
.
Write
a C
Program
to
check
if a
given
Matrix
is
an
Ident
i
ty
Matrix
or
not.
14
I
Q3.
Q4
.
Q7
.
Write
a C
program
us
i
ng
function
to
find
la
rgest
number
i
nto
entered
3
numbers
. I 3 I
Write
a C
program
to
read
the
E
mployee
ID
,
name
and
salary
of
the
n
Employee
in a
Company
and
find
the
average
salary
of
the
comp~y. r3 I
SECTION
11
\
What
do
yo
u
mean
by stri
ng
var
i
able
.
how
can\vc i
nit
i
al
i
ze
it.
I
low
a C
comp
il
er
I
provides
a
large
number
of ·•li
brary
funct
i
on
..
for/man
i
pulat
i
ng
strings
.
Spi.:
cify
ea
ch
function
and
its
syntax
with
exa
mple
in
deta
i
I.
\ i I
41
Write
a C
Program
to
Count
number
of
pos
iti
ve
,
negative
and
zeroes
in
an
i
nteger
array
and
draw a
flowchart
of i
t.
/
131
What
do
you
mean
by
parameter
pass
i
ng
in
funct
i
ons
descr
i
be
i
ts
approa
c
hes
in
detai
l
with
the
help
ofC
program
. 1
31
Q8
.
Write
a C
Program
to
swap
third
and
fourth
element
of
an
array
us
ing f
unct
i
on
.
131
Q9
.
Write
a C
Program
to
draw
the
follow
i
ng
pattern
-
13
I
QI
O.
Multiple
Choice
t
ype
Quest
io
ns
-
a. A
po
i
nter
value
refer
to
("<.
.
an
integer constant
# #
# #
# #
v.
Any
val
id
address
in
memor
y
13
1
-
13
. a noat
value
J). any
ord
i
nar
y
var
i
able
P.
1.
0
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download C Language Ques Paper-2k17 UIET, Knp and more Exams Computer Programming in PDF only on Docsity!

END SEMESTER EXAMINATION

UIET, CSJM University, Kanpur

Department- IT Semester- I

Subject - Programming and Computing using C ([SC-S tot)

Time- 3:00 hours Max. Marks-

SECTIOl\ A

· Q l. Write a C Program to read the information i.e. name , id and salary of n emp loy ee s from

the keyboard and write it to a file. I 4 I

Q2. Write a C Program to check if a given Matrix is an Ident ity Matrix or not. 14 I

Q3.

Q.

Q.

Write a C program us ing function to find la rgest number into entered 3 numbers. I 3 I

Write a C program to read the Employee ID , name and salary of the n Employee in a Company and find the average salary of the comp~y. r3I

SECTION 1 1

__

What do yo u mean by string var iable. how can\vc i nitI ial ize it. I low a C comp il er provides a large number of ·•library funct ion .. for/man i pulat ing strings. Spi.: cify ea ch

function and its syntax with exa mple in deta iI. \ i I 41

Write a C Program to Count number of pos itive , negative and zeroes in an integer

array and draw a flowchart of it. / 131

What do you mean by parameter pass ing in funct ions descr ibe its approa c hes in detai l

with the help ofC program. 131

Q8. Write a C Program to swap third and fourth element of an array us ing funct ion. 131

Q9. Write a C Program to draw the follow ing pattern - 13 I

QI O.Multiple Choice type Quest io ns -

a. A po inter value refer to

("<.. an integer constant

v. Any val id address in memor y

    1. a noat value J). any ord inar y var iable P. 1. 0

b. Pointer is used for ./Y. static memory allocation

./C. both options a and b.

flJ. dynamic memor y allocation v D. a posit iv e integer

c. If' a variable is a po inter to a structure, then which of the following operator is used to access data members of' the structure through the pointer var iable? _..,A. '.' •·-B. '& ' v. C^ '' )1^.*^ '->'

Q 10. Show the Output for the following programs-

(a .) main( ) { int a,b,c; a== 4, b.::. 3;

c-^0 a && b;

b=a 11 b 11 c; a -a && b II c; printf("¾d ¾d ¾d",c,b,a) ; getch() ; } ! (c ~)

/j ~ II define sc "% s Geeks Geeks "

1/! f: main() , {

(

I printf(sc, sc) ;

\ I getchar();

J

return O; }. / ---· -- -- - ----------- -----

Q 11. Describe the follow ing -

a. Function Prototype Declaration b. Union c. lsdigit() Function

(b.) main( ) { int x 3,y -4,z I; X 1 --=- y;

y -=x;

z *=x; printf( "¾ d ¾d ¾d".x.y .1.) : getch();

(d.) ma in()
{ int i J);- li~it 5; pr in{jf·V.~luc of I \n"); I for(^ '· i' <^ ltirnitI · )'

j

, 1 i't p

0 r~tf("%d \n'', i) ; } ' } (^) - -- 7'' (^) -· ·--/

[

11 I I 11 111

,

I

3 (~ w'rite a progra _m that ·computes and displays all the

~~res of the numbers from 1 to 50. The .output sho·ul d be

Of the following form,

l/ ~ Explain the different types of loops in C with syntax '_ v and example.

4 ~-. Write a program to read a line of text and output. the

nuzhber of words and characters in it.

9:{'j hat^ ' is a structure? Explain the syntax of structure 1i tion with example.

'l.,~f~e:r::"an~ ~~~:rarn that disp:,ays -~l the prime numbers

. , ' I ·'

· \ · 6 (~ · What is an operator? Explain ·the arithmetic,

'l,, _/1.,.-fe1ational, logical,. and issignment operator.s in C

language.

  • I

~ ~ Write a program that read a integer number and

~ay~ rever~ed number·. ........,

~ ~Write a program that =ead a list of ten integers from

9 vl'.- ./ -~ ~ · and computes the ~dmal - and maximum number

appearing in the list.. MIN~.

  • '2., ''~- : (..bV. b~sig~ and devel~p a C program to read a year as an . ~ut and find · whether it is ·1eap year r. ·

t//4 J:{..af, ' W~at do you mean by func~ions? Dif~erentiate between

μser.-tiefined function and predefined functions. ·

')., / 1 tJ¥': Write a program in C to find ·the area and perimeter ' off a circle.

. ·: (/'-~ , '";,- Ov -;;..o 1'

wtJ f e r _V_ ') 9' <:.

. ~;'c. ,(// V,1, f Q _;

· "-r<2.N ==- 7J··ev -¥- 1 o-\ ')-e.J.AI/

rv1. : v,/ t o , .:> ./

Department of Computer Science and Engineering

UIET, CSJM University, Kanpur

Mid Semester Examination, 2016

B. Tech.^.^ (CHE- 1 st^ ' $em)

1s c-s .. 101

Time : 1 Hour 30 Minutes MM: 30

Note: Attempt all questions ·each question carries equal

11Ja.rks.

fiite' a C Program that read a inL09er number and find input

· number is prime or composite number.

cfarite C program to, print following pattern.

0 \ ,>, (2r~r ~. : l, ~ _;} (D

r~. / : ~ 6) ;

CD fJ^

1) I 0^2 3

  1. 2,,,^ ../^3 .-^4 <^5^ ,,~^ I

~aw'a flow chart to print all odd numbers between 50 and

4/.'write C program to

/ case/ upper case)

Alain 7ollowing

programming

a. Keywords

b. Identifiers

c. Data Types

find case of input character (i.e lower ·

and print character in other case.

terms with examples in context of C

Department of IT

UIET, CSJM UNIVERSITY KANPUR

Exam: QUIZ 2 Maximum Marks :-

Semester-1st Time: 50 minutes

Subject: Programming and Computing using C (ISC-S 101)

Q. 1. Write a program to find the largest number from a given array.

Q.2. Writ e a program for generation of Fibonacci series us =ng recursion.

[3]

[3)

Q.3. Can we perform an assignment operation on pointers what is your opin ion if yes than wr ite a program to illustrate this concept. [3 )

Q.4. Write a program to print the following pattern;

Q.5. Describ e th e following tenns-

a. Call by reference

b. Return statement c. Global variable

I I

[3 ]

[I ]

[I ]

[ I l

I

Department of IT

VIET, CSJM UNIV ERSITY KANPUR

Exam : QUIZ 1 Date of Examination: 15/09/ 17

Semester-1st Time: 50 minutes

Subject: Programming and Computing (ISC-S 101)

Max. Marks:-

Q. l. What do you mean by computer.draw its Bl oc k Diagram and define its characteristics ?[3]


Q.2. What are the four parts of C Language, Define its characteristics. [3)

Q.3. Suppose pen cost Rs. 125 per dozen. Howe ve r if a purchase is made for more than I dozens a discount of I 0% is allowed. Devel op a C program to compute the price if a user enters n dozens of pens as an input. Draw a flow chart of the program. [3]

Q.4. Show the output of the followings-

main ()

int a=8 ,b=l5,x=l0,y-=15 ;

printf(" a&b is %d \n ", a&b) ;

printf("a << 3 is %d \n", a<< 3) ;

exl7X *++y;

printf("value of exl is %d \n ", exl);

getch();

Q.5. Describe the following tenns-

a. compiling b. break c. computation of addresses range of int datatype

I

"= ,__- I

[3]

[l]

[ 1]

[l]

I; -<!