• Tidak ada hasil yang ditemukan

CS-05 / IT-05 {ZX}e : ¶h 鳧Z-n VrZ - VMOU Question Papers

N/A
N/A
Protected

Academic year: 2025

Membagikan "CS-05 / IT-05 {ZX}e : ¶h 鳧Z-n VrZ - VMOU Question Papers"

Copied!
6
0
0

Teks penuh

(1)

CS-05 / IT-05

June - Examination 2016 BA/BSC Pt. II Examination

Programming in C Paper - CS-05 / IT-05

Time : 3 Hours ] [ Max. Marks :- 70

Note: The question paper is divided into three sections A, B and C. Write answers as per given instructions.

{ZX}e : ¶h àíZ-nÌ VrZ IÊS>m| "A', "~' VWm "g' ‘| {d^m{OV h¡& à˶oH$

IÊS> Ho$ {ZX}emZwgma àíZm| Ho$ CÎma Xr{OE&

Section - A 7

×

2 = 14 (Very Short Answer Questions)

Note: Answer all questions. As per the nature of the question delimit your answers in one word, one sentence or maximum upto 30 words. Each question carries 2 marks.

IÊS> - "A' (A{V bKw CÎmar¶ àíZ)

{ZX}e : g^r àíZm| Ho$ CÎma Xr{OE& Amn AnZo CÎma H$mo àíZmZwgma EH$ eãX, EH$ dm³¶ ¶m A{YH$V‘

30

eãXm| ‘| n[agr{‘V H$s{OE& à˶oH$ àíZ

2

A§H$m| H$m h¡&

800

CS-05 / IT-05 / 100 / 6 (1) (P.T.O.)

(2)

CS-05 / IT-05 / 100 / 6 (2) (Contd.)

1) (i) What will be output of following code segment:-

{ZåZ {X¶o J¶o

code segment

H$m

output

³¶m hmoJm :-

int a=-5, b=-2,c; c=a%b; printf(“%d”,c);

(ii) State the rules to name identifiers/variables in C programming language.

C programming language

‘|

name identifiers/variables

Ho$

{Z¶‘ H$mo ~VmBE&

(iii) What will be output of following code segment:-

{ZåZ {X¶o J¶o

code segment

H$m

output

³¶m hmoJm :-

int *iptr; char *cptr;

printf(“%d\n%d\n”, sizeof(iptr),sizeof(cptr));

(iv) What will be output of following code segment:-

{ZåZ {X¶o J¶o

code segment

H$m

output

³¶m hmoJm:-

int i; for(i=1;i<=10;i++);

printf(“%d\n”,i);

(v) What will be output of following C program:-

{ZåZ {X¶o J¶o

code segment

H$m

output

³¶m hmoJm:-

#include<stdio.h>

#define SQR(x) x*x int main( )

{ int a, b=3; a=SQR(b+2);

printf(“%d\n”,a); return 0;

}

(vi) What is array ? array

³¶m h¡?

(3)

CS-05 / IT-05 / 100 / 6 (3) (P.T.O.)

(vii) What will be output of following code segment:-

{ZåZ {X¶o J¶o

code segment

H$m

output

³¶m hmoJm:-

char str[ ] =”VMOU”; int a=5;

print(a>10? “C Programming” : %s\n”,str);

Section - B 4

×

7 = 28 (Short Answer Questions)

Note: Answer any four questions. Each answer should not exceed 200 words. Each question carries 7 marks.

(IÊS> - ~) (bKw CÎmar¶ àíZ)

{ZX}e : {H$Ýht Mma àíZm| Ho$ CÎma Xr{OE& Amn AnZo CÎma H$mo A{YH$V‘

200

eãXm| ‘| n[agr{‘V H$s{OE& à˶oH$ àíZ

7

A§H$m| H$m h¡&

2) Differentiate between header file and library file.

Header file

Am¡a

library file

‘| A§Va g‘PmBE&

3) What are similarities and differences between structures and unions. Explain with suitable example.

Structures

Am¡a

union

‘| g‘mZVm Am¡a A§Va ~VmAmo& VWm Bgo CXmhaU g{hV g‘PmBE&

4) Explain the use of pointer operators (& and *), with suitable example(s).

Pointer operator (&

Am¡a

*)

H$m Cn¶moJ ~VmBE, CXmhaU Ho$ gmW&

(4)

CS-05 / IT-05 / 100 / 6 (4)

5) How bubble sort, perform sorting of array elements? Explain with suitable example.

array element

H$s gm°{Q>ªJ

bubble sort

Ho$ Ûmam H¡$go hmoVr h¡? CXmhaU g{hV g‘PmAmo&

6) Write a C program, explaining the concept of recursion.

Recursion

H$m {gÕm§V

C

àmoJ«m‘ Ûmam g‘PmBE&

7) What is meant by generic/void pointer? Explain with suitable example.

Generic/void pointer

go Amn ³¶m g‘PVo h¢? CXmhaU g{hV g‘PmBE&

8) What is an algorithm? Write an algorithm to find largest element in an array and print its position in array.

Algorithm

³¶m h¡?

array

‘| g~go ~‹S>r g§»¶m nVm bJmZo VWm CgH$s pñWVr nVm bJZo H$mo

algorithm

{bI|&

9) Explain working of nested for loop, using a suitable example.

Nested ‘for’ loop

H$mo H$m¶©àUmbr H$mo g‘mPm¶|& VWm BgH$m CXmhaU ^r X|&

Section - C 2

×

14 = 28 (Long Answer Questions)

Note: Answer any two questions. You have to delimit your each answer maximum upto 500 words. Each question carries 14 marks.

(5)

CS-05 / IT-05 / 100 / 6 (5)

(IÊS> - g) (XrK© CÎmar¶ àíZ)

{ZX}e : {H$Ýht Xmo àíZm| Ho$ CÎma Xr{OE& AmnH$mo AnZo CÎma H$mo A{YH$V‘

500

eãXm| ‘| n[agr{‘V H$aZm h¡& à˶oH$ àíZ

14

A§H$m| H$m h¡&

10) With respect to dynamic memory allocation, explain with example.

Dynamic memory allocation

Ho$ g§X^© ‘|, {ZåZ H$mo g‘Pm¶| :-

(i) How block of memory is allocated ? Memory

H$m

block

H¡$go

allocate

hmoVm h¡?

(ii) How multiple blocks of memory are allocated?

~hþV gmao

block

H¡$go

allocate

hmoVo h¢?

(iii) How used memory space is released?

Memory space

H¡$go

released

hmoVr h¡?

(iv) How can the size of allocated memory be altered?

Allocated memory

H$s g§»¶m H$mo H¡$go n[adV©Z {H$¶m Om gH$Vm h¡?

11) (i) Write a C program to swap two integer numbers, without using third variable. (Numbers should be input by user) (ii) Write a C program, which inputs a non negative integer

from user, and check whether the number is even or odd.

(i)

{dZm Vrgao

variable

H$m Cn¶moJ {b¶o Xmo

integer

g§»¶m Ho$

swap

H$aZo H$m

C

àmoJ«m‘ ~ZmBE&

(ii)

g§»¶m g‘ AWdm {dg‘ h¡, H$m

C

àmoJ«m‘ ~ZmBE&

(6)

CS-05 / IT-05 / 100 / 6 (6)

12) Write a C program, which calculates area of following geometrical shapes.

Circle, Rectangle, Square, Triangle, Trapezium using switch-case. (Input should be provided by user)

Switch-case

H$s ‘XX go {ZåZ H$m joÌ’$b {ZH$mbZo H$m

C-

àmoJ«m‘

{bI|:-

Circle, Rectangle, Square, Triangle, Trapezium

13) Explain all storage classes and properties associated with it, using suitable example(s).

g^r

storage class

Am¡a CZgo OwS>r g^r {deofVmAm| H$mo CXmhaU g{hV

g‘PmBE&

Referensi

Dokumen terkait

11 Test the series /x2^1- x2hn-1 for inform convergence continuity of sum in inverval | |x ‘| à˶oH$ g§d¥V Jmobm EH$ g§d¥V g‘wÀM¶ hmoVm h¡& ii Show that every infinite subset of a

¶yamon ‘| Y‘© gwYma AmÝXmobZ Ho$ H$maU Am¡a n[aUm‘m| H$m {ddoMZm H$s{OE& 11 Evaluate the achievements of Nepolean Bonaparte as an

gm‘m{OH$aU H$s H$moB© Xmo g§ñWmAm| Ho$ Zm‘ {bImo& iii Write the two theories of social stratification.. gm‘m{OH$ ñVarH$aU Ho$ H$moB© Xmo {gÕm§V {bImo& iv Who wrote the book cultural

ñdm¶Îm VpÝÌH$m VÝÌ VWm BgHo$ H$m¶m] H$m dU©Z H$a|& 3 Explain the principles of perceptual organization.. Am§I H$s g§aMZm d H$m¶© na boI {bI|& 5 Describe the classical conditioning

^maV ‘o Om{VdmX na {Z~ÝY {b{IE& 11 Write different causes of Unemployment in

Am{X‘ g‘mOm| ‘| amOZr{VH$ g§ñWmAm| Ho$ Cna EH$ {Q>ßnUr {b{IE& 9 Mention the provisions in Indian Constitution for tribal welfare... You have to delimit your answer maximum upto 500

g{dZ¶ Adkm AmÝXmobZ na g§{jßV {Q>ßnUr {b{IE& 3 Write a short note on Non-Co-operation Movement... You have to delimit your each answer maximum up to 500

{‘ba d ñHy$J H$m D$VH$ g§dY©Z ‘| ¶moJXmZ& ii Contribution of Haberlandt in tissue culture.. aopñQ´>³eZ EÝS>moݶy³brEZ H$mo n[a^m{fV H$s{OE Ed‘² BgHo$ àH$ma H$s CXmhaUg{hV {ddoMZm