You are on page 1of 2

Date:13/09/2019 Enrolment No.

:___________________

RK UNIVERSITY
B.TECH./SEM-II/REMEDIAL/AUG.-2019

CE204: BASICS OF COMPUTER PROGRAMMING

Time: 01:30 PM TO 03:00 PM Total Marks: 50

Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Programmable calculator is not permissible.

Q.1 (a) Select the most appropriate option: (Each of one mark) 06
1. What does a==b means?
a. Stores the value
b. Compares the value
c. pass the value
d. None of above
2. What is the size of an int data type?
a. 4 Bytes
b. 8 Bytes
c. Depends on the system/compiler
d. Cannot be determined
3. Comment on the following pointer declaration.
int *ptr, p;
a. ptr is a pointer to integer, p is not
b. ptr and p, both are pointers to integer
c. ptr is a pointer to integer, p may or may not be
d. ptr and p both are not pointers to integer
4. Which of the following is a correct comment?
a. */ comments */
b. /* comment */
c. /// comments
d. {comments}
5. What will be the output of the following C code?
#include <stdio.h>
int main()
{
char *str = "hello, world\n";
printf("%d", strlen(str));

}
Page 1 of 2
a. Compilation error
b. Undefined behavior
c. 13
d. 11
6. Which operator connects the structure name to its member name?
a. - (dash)
b. . (dot)
c. &
d. None

(b) Answer following questions: (Each of two mark) 10


1. Differentiate high level and assembly level programming language
2. How to declare and initialize a pointer?
3. What do you mean by compiler and interpreter in C?
4. Describe basic structure of C program.
5. Define the term user defined function. Also justify the use of
function.

Q.2 (a) Justify following functions with example: 06


strcat(), strcpy(), strrev().
(b) Differentiate between entry-controlled loop and exit-controlled loop 05
(c) Discuss recursion? Explain it with suitable example. 05
OR
Q.2 (a) Discuss 1D and 2D array with suitable examples. 06
(b) Construct a C program to swap two variables using third variable. 05
(c) List out various operators available in C. Discuss any three among 05
them in detail.

Q.3 (a) Describe Else-If ladder statement with example. 06


(b) Elaborate structure with example. 06
(c) Discuss different operations that can be performed on pointer with 06
example.
OR
Q.3 (a) Elaborate break and continue statements with example. 06
(b) Construct a C program to demonstrate call by value and call by 06
reference.
(c) Create a program to read from a file and write in a file. 06

*************

Page 2 of 2

You might also like