GTU First Year Engineering (Semester 2)
Computer Programming & Utilization
May 2016
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


1(a)(i) Which of the following is ternary operator?
(a) ??   (b) ?:   (c) ::
1 M
1(a)(ii) Which header file is essential for using scanf() function?
(a) ctype.h   (b) conio.h   (c) string.h   (d) stdio.h
1 M
1(a)(iii) A declaration float sum, value; occupies _______ of memory?
(a) 2 byte   (b) 6 byte   (c) 4 byte   (d) 8 byte
1 M
1(a)(iv) Array index start at
(a) 1   (b) 0   (c) User Defined   (d) None of above
1 M
1(a)(v) When function calls itself, it is known as _______ .
(a) Recursion   (b) Nested loop   (c) exit control loop   (d) user defined function
1 M
1(a)(vi) Default value of global variable is
(a) 0   (b) Garbage value   (c) 1   (d) Depend on data type
1 M
1(a)(vii) When fopen () fails to open a file it returns
(a) NULL   (b) -1   (c) 1   (d) None of above
1 M
1(b)(i) Default value of local variable is
(a) 0   (b) Garbage value   (c) 1   (d) Depend on data type
1 M
1(b)(ii) ASCII value of 'A' is _______ .
(a) 55   (b) 75   (c) 65   (d) 85
1 M
1(b)(iii) MACRO is used to _______ .
(a) Save memory   (b) Both a & c   (c) fast execution   (d) none of these
1 M
1(b)(iv) Every string is terminated by NULL character. How it is Represented?
(a) '\0'   (b) NULL   (c) both a and b   (d) None of above
1 M
1(b)(v) Which are not looping structures?
(a) For loop   (b) Do...while loop   (c) While loop   (d) if...else
1 M
1(b)(vi) If ptr is a pointer to int, having value ptr=100. After ptr++, what is the value of ptr?
(a) 100   (b) 102   (c) 101   (d) 103
1 M
1(b)(vii) How many times the following code prints the string 'hello'
for (i=1 ;i<=50 ;i++);
printf('Hello');
(a)1   (b) Zero   (c) 50   (d) None of them
1 M

2(a) List out types of software with Examples.
3 M
2(b) Explain flow chart with suitable example.
4 M
2(c) Write a C program to convert Celsius to Fahrenheit and vice versa.
7 M

3(a) Discuss the important of stdio.h header file.
3 M
3(b) Explain entry control loop and exit control loop with example.
4 M
3(c) Write a menu driven C program for simple calculator. Also draw flowchart.
7 M

4(a) Explain basic data types of C.
3 M
4(b) Explain break and continue statement with example.
4 M
4(c) Write a C program to display prime number between 1 to 100.
7 M

5(a) Explain Derive data types.
3 M
5(b) Explain getch(), getchar(), gets(), puts()
4 M
5(c) Write a C program to multiply two N X N Matrix.
7 M

6(a) Briefly discuss about scope of variable.
3 M
6(b) Explain Call by value and Call by reference.
4 M
6(c) Which type of problem can be solved by structure? Explain it with C program.
7 M

7(a) Explain dynamic memory allocation.
3 M
7(b) Write syntax of fseek() function and explain fseek(fp,-10,1) and 04 fseek(fp,10,0).
4 M
7(c) Write a program to read n different integer numbers from keyboard and calculate the sum using pointer.
7 M



More question papers from Computer Programming & Utilization
SPONSORED ADVERTISEMENTS