0% found this document useful (0 votes)
11 views

pyq_c(2022)

The document is an examination paper for a Computer Programming course in C, dated June 2022, with a total duration of 3 hours and full marks of 60. It consists of multiple groups of questions, including multiple-choice questions, fill-in-the-blanks, and descriptive questions covering various topics related to C programming. Students are required to answer questions from different groups as directed, testing their knowledge on keywords, functions, data types, and programming concepts.

Uploaded by

ranajitbarik2005
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)
11 views

pyq_c(2022)

The document is an examination paper for a Computer Programming course in C, dated June 2022, with a total duration of 3 hours and full marks of 60. It consists of multiple groups of questions, including multiple-choice questions, fill-in-the-blanks, and descriptive questions covering various topics related to C programming. Students are required to answer questions from different groups as directed, testing their knowledge on keywords, functions, data types, and programming concepts.

Uploaded by

ranajitbarik2005
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

3 2 Ij ] June 2022

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

GROUP -A
1. Choose the correct alternative (Any ten) 1 x 10=10

i) ‘C’ is often called a a) Object oriented language b) High level language c) Assembly ‘language d)
Machine level language

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

iii) Which escape character can be used to begin a new line inC?-a)\a__b)\b_—sc)\m_~—s d\n.

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

v) The function Strepy(s1,s2) call means_ a) copies s1 string into s2 b)copies s2 string into sl c)copies
both sl ands2 d) None of these

vi) File manipulation functions in C available in header file _a) streams.h b)stdio.h c)stdlib.h d)files.h

vii) What is the limit for number of functions in a C Program? a) 16 b)31 c)32 d)No Limit

viii) Address stored in the pointer variable is of type .a) Integer b) Float c) Array
d) Character
ix) int main()
{
int i= -5;
int k =i %4;
printf("%od\n", k);
}
a) Compile time error b) -1 c) 1 d) None

x) How many times will the following loop execute for(j = 1; j <= 10; j =j-1)? A) forever b) never c) 0
d) 1

xi What is the output of the following program?


#include<stdio.h>
main()
{
int r, x = 2;
float y = 5;
r= y%x;
printf("% od", 1);

a) 1 b)0 c)2 d) Compile error


1
>
i Jobal variables c) ace
xii) The machine registers are sometimes called 2) local variables b) 8 UMULator,
d) static variables

4d) None
NO
xiii) The value of -17%-Sis_a)3.4b) 3 c)-3
xiv) x=5; y=x++; The values of x and y will be _ 7
a) x=5,y=6 —b) y=5,x=6 c) x=5,y=5 d) x=6,y=6 '
- b) int num = 100000; c int
my num ~
xv) Which is valid C expression? a) int my_num = 100,000; b) int my_ um
1000; d) int $my_num = 10000
1x 10=19
2. Fill in the blanks (Any ten):

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


ii) The C language consist of number of keywords.
ili) Each string is terminated with a character.
iv) scanf() is a predefined function in header file.
v) The is equivalent to a = a-1.
vi) is unconditional control structure in C.
vii) The EOF is equivalent to
viii) If the 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
xiii) The operator “- -’’ is known as ----- operator.
xiv) If a 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)
1x 10=10
i) What is keywords?
ii) What is prototype declaration of a function?
_
iii) What do you mean by library function in C program?
2
iv) What do you mean by debugging?
v) What is the difference between declaring a header file with > and
” “?
vi) What is the use of a ‘\0’ character?
vii) What is a syntax error?
viii) What is token?
ix) Write the difference between = and == in C programming. F
x) What is global variable? :
xi) What is malloc ()? x
xili) What is typecasting?
if
ks
xiv) What is the job of Assembler in C programming?
xv) What are macros? :
3.
GROUP -B
4. Answer the questions (Any six) :
2x6=12 4
i) What is Bit wise operation in C? _
ii) What is header file?
iii) Write down the advantage of the Structured program, :
iv) State the types of User-Defined Functions. j
5
v) What is the difference between do-while and while loop?
vi) Evaluate c=a+++--b-at+++b where a=8,b=4.
vii) Convert (167) base 10 to binary.
viii) Explain size of operator with example
ix) Wnite the differences between Compiler and Interpreter.
x) Name the types of Arrays.
xi) What is looping in C?
xii) Differentiate Source Codes from Object Codes.
GROUP -C
5. Answer the question (any one) 6x!

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
fi 2) 2 3) be given from the keyboard.
up to ‘n’ terms, the value of ‘n’ should

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 a c program for reading and writing some integer value using the concept of Dynamic Memory
Allocation.

You might also like