Computer Programming in C (2022)
Computer Programming in C (2022)
307/1(N)
COMPUTER PRoGRAMMING IN C
Time Allowed: 3 Hours Full Marks: 60
GROUP -A
1. Choose the correct alternative (Any ten) lx 10=10
)'C is often called aa) Object oriented language b) High level language c) Assembly language d)
Machine level language
ii) Which operator has the lowest priority? a)t+ b)% c+ d) ||
ii)Which escape character can be used to begin a new line in C? - a)la b)\b c)\m 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) Avariable refers to a location in memory.
v) The function Strcpy(s1,s2) call means_ a) copies sl string into s2 b)copies s2 string into sl c)copies
both sl and s2 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
vii) 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("%dn", k);
a) Compile time error b) -1 c) 1 d) None
x) How many times will the following loop execute forj =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("%d", r);
a) 1 b) 0 c) 2 d) Compile error
X11) The machine registers are sometimes called a) local variables b) global variables c) accumulators
d) static variables
i)What is keywords?
iü) What is prototype declaration of a function?
ii) What do you mean by library function in Cprogram?
iv) What do you mean by debugging?
v) What is the difference between declaring a header file with o and " "?
vi) What is the use of a '\0' character?
vii) What is a syntax error?
vii))What is token?
ix) Write the difference between = and = in Cprogramming.
x)What is global variable?
xi) What is malloc ()?
xii) What is typecasting?
xiv) What is the job of Assembler in Cprogramming?
Xv) What are macros?
GROUP -B
4. Answer the questions (Any six) 2x6=12
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 Cto 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.
a) Discuss with programming examples the different types of String Handling Function in C.
c) Write a cprogram for reading and writing some integer value using the
Allocation. concept of Dynamic Memory