0% found this document useful (0 votes)
69 views3 pages

CST 3 Sem Computer Programmin in C 307 1 N Jun 2022

The document is a computer programming exam in C language with questions divided into three sections: Group A with multiple choice and fill in the blank questions, Group B with short answer questions, and Group C with long answer questions requiring programs. Some key topics covered include basic C syntax, operators, data types, loops, functions, arrays, pointers, strings, storage classes, and dynamic memory allocation. Students are required to choose and answer questions from each group as directed, demonstrating their knowledge of fundamental C programming concepts.

Uploaded by

Manik Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views3 pages

CST 3 Sem Computer Programmin in C 307 1 N Jun 2022

The document is a computer programming exam in C language with questions divided into three sections: Group A with multiple choice and fill in the blank questions, Group B with short answer questions, and Group C with long answer questions requiring programs. Some key topics covered include basic C syntax, operators, data types, loops, functions, arrays, pointers, strings, storage classes, and dynamic memory allocation. Students are required to choose and answer questions from each group as directed, demonstrating their knowledge of fundamental C programming concepts.

Uploaded by

Manik Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

895 June 2022

307/1(N)
cOMPUTER PROGRAMMING IN C
Time Allowed: 3 Hours Full Marks: 60
r the following questions from Group-A, B & C as directed.

GROUP-A
1. Choose the correct alternative (Any ten) Ix10-10
a) Object oriented language b) High level language c) Assembly:language d)
i)C is often called a

Machine level language

ii)Which operator has the lowest priority? a)++b% c)+ d)


ii) Which escape character can be
used to begin a new line in C? a)la-

bb c)\m d)n.
with different scope. b) A single
iv) Which is false? a) A variable defined once can be defined again
declared and
in the same scope. c) A variable must be
variable cannot be defined with two different types
location in memory.
defined at the same time. d) A variable refers to a

sl string into s2 b)copies s2 string


into sl ccopies
v) The function Strcpy(s1,s2) call means a) copies
both sl and s2 d) None of these

in C available in header file a) streams.h b)stdio.h


c)stdlib.h d)files.h
vi) File manipulation functions
in C Program? a) 16 b) 31 c) 32 d) No Limit
What is the limit for number of functions
a
vii)
variable is of type a) Integer b) Float c) Array
vii) Address stored in the pointer
d) Character

ix) int main0

int i= -5;
int k = i %4;

printf("%dn", k);
None
a) Compile time error b) -1 c) d)
1
forever b) c) 0
forg = 1;j =10;j=j-1)? A)
never
execute
How many times will the following loop
x)
d) 1

xi What is the output of the following program?


#include<stdio.h>

main)
int r, x = 2;

float y= S5;
r= y%x;
printf(%d", r);
c) 2 d) Compile error
a)1 b) 0
1
xii) The machine registers are sometimes called a) local variables b) global variables c) accumulators
d) static variables

xii) The value of - 17 % -5 is_a) 3.4 b) 3 c)-3 d) None

xiv) x=5; y=xt+; The values of x and y will be


a) x=5.y=6 b)y-5,x=6 c)x-5,y=5 d)*=6,y=6
xv) Which is valid C expression? a) int my_num= 100,000; b) int my_num = 100000; c) int my num=
1000; d) int Smy_num = 10000

2. Fill in the blanks (Any ten): 1x 10 -10

i) Long int I In 32-bit compiler occupies bytes in main memory.


ii) The C language consist of number of keywords.
ii) Each string is terminated with a character.
iv) scanf) is a predefined function i n _ header file.
is equivalent to a = a-1.
v) The
vi isunconditional control structure inC.
vii) The EOF is equivalent to
vii) Ifthe function returns no value then it is called
ix) The union holds_
x) By default a variable is assigned with in static storage class.
xi) Array subscripts in C always start at_
xii) The run time library is collection of files
xi) The operator". -" is knownas --- operator.

xiv) Ifa is an integer variable, a=1 1/2 will store in a


xv) The C language was originally developed from language.
3. Answer the following question (any ten) lx 10 =10

i) What is keywords?
i) What is prototype declaration of a function?
ii) What do you mean by library function in C program?
iv) What do you mean by debugging?
vWhat is the difference between declaring a header file with and *2
vi) What is the use ofa "\0° character?
vii) What is a syntax error?
vii) What is token?
ix) Write the difference between and== in C
x) What is global variable?
=

programming.
xi) What is malloc ()?
xi) What is typecasting?
xiv) What is the job of Assembler in C
xv) What are macros? programming?
GROUP-B
4. Answer the
questions (Any six) 2x6-12
i) What is Bit wise operation in C?
ii) What is header file?
ii) Write down the advantage of the Structured
program.
iv) State the types of User-Defined Functions.

2
v)What is the difference between do-while and while loop?
vi) Evaluate c=at++--b-at++b where a=8,b=4.
vii) Convert (167) base 10 to binary.
vi) Explain size of operator with example
ix) Write the differences between Compiler and
x) Name the types of Arrays.
Interpreter
xi) What is looping in C?
xii) Differentiate Source Codes from Object Codes.
GROUP-C
5. Answer the question (any one) 6x1

a) What do you mean by associativity of an operator? Explain break and continue statement with an
example.
b) Write a program to calculate GCD of two numbers. Why goto statement should be avoided in c?

c)What do you mean by nested loop structure? b) Write a program in C to find the sum of the series
1+(1+2) +(1 +2 +3) +. . up to 'n' terms, the value of 'n' should be given from the keyboard.

6. Answer the question (any one) 6x1

a) Discuss with programming examples the different types of String Handling Function in C.

b) Discuss different Storage Class with example.

c)Write a C program to find reverse of a string.

7. Answer the question (any one) 6x1

a) What do you mean by a pointer to a function? Write a C program to access a one dimensional array
using pointer.
b) Write a recursive function to obtain the returning sum of first 25 natural numbers. Write a program to
find weather a year is leap year or not

c)Write ac program for reading and writing some integer value using the concept of Dynamic Memory
Allocation.

You might also like