Printed Page 1 of 1 Sub Code:RCAI101
Paper Id: 206101 Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
MCA (INT)
(SEM I) THEORY EXAMINATION 2019-20
PROGRAMMING IN C
Time: 3 Hours Total Marks: 70
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
1. Attempt all questions in brief. 2 x 7 = 14
a. What will be the output of the following code
for(i=1; i<10;i++);
printf(“%d”, i);
b. What is the use of flow chart?
c. What do you mean by system software and application software?
d. What is the task of a loader?
e. What do you mean by formal parameters?
f. If a = 14 and b= 3, what is the result of a/b in C language?
g. Declare and initialize a 2 dimensional array during compile time.
SECTION B
2. Attempt any three of the following: 7 x 3 = 21
a. How do-while loop is different from while loop? Give the syntax and working
of both the loops.
b. What are the disadvantages of 1st generation computers?
c. Draw a flow chart to find the sum of 1 to N.
www.aktuonline.com
d. Write a function to find factorial of a number.
e. Write a program in C to search a number in a given array of numbers.
SECTION C
3. Attempt any one part of the following: 7x1=7
(a) Write a program in c to count the number of characters in a string.
(b) What do you mean by type casting? Illustrate implicit type casting and explicit
type casting with suitable example.
4. Attempt any one part of the following: 7x1=7
(a) Define algorithm. What are the attributes of a good algorithm?
(b) Write a program in C to print the pattern
A
AB
ABC
ABCD
ABCDE
5. Attempt any one part of the following: 7x1=7
(a) “A variable is declared as static”. Illustrate with example the behavior of the
variable.
(b) Write a program in C to print the transpose of a matrix.
6. Attempt any one part of the following: 7x1=7
(a) Differentiate between compiler and interpreter.
(b) What do you mean by precedence and associativity of operators? Explain with
a suitable example.
7. Attempt any one part of the following: 7x1=7
(a) Write a function to check an input number is prime or not. The function should
return a value of 1 if the number is prime otherwise it should return 0.
(b) Write the syntax of switch statement and explain its working. Illustrate with a
suitable example.
1|P a ge
http://www.aktuonline.com