Question Paper: Computer Programming & Utilization : Question Paper May 2016 - First Year Engineering (Semester 1) | Gujarat Technological University (GTU)

Computer Programming & Utilization - May 2016

First Year Engineering (Semester 1)

(1) Question 1 is compulsory.
(2) Attempt any four from the remaining questions.
(3) Assume data wherever required.
(4) Figures to the right indicate full marks.
1(a)(i) Which of the following is ternary operator?
(a) ??   (b) ?:   (c) ::
(1 marks)
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 marks)
1(a)(iii) A declaration float sum, value; occupies _______ of memory?
(a) 2 byte   (b) 6 byte   (c) 4 byte   (d) 8 byte
(1 marks)
1(a)(iv) Array index start at
(a) 1   (b) 0   (c) User Defined   (d) None of above
(1 marks)
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 marks)
1(a)(vi) Default value of global variable is
(a) 0   (b) Garbage value   (c) 1   (d) Depend on data type
(1 marks)
1(a)(vii) When fopen () fails to open a file it returns
(a) NULL   (b) -1   (c) 1   (d) None of above
(1 marks)
1(b)(i) Default value of local variable is
(a) 0   (b) Garbage value   (c) 1   (d) Depend on data type
(1 marks)
1(b)(ii) ASCII value of 'A' is _______ .
(a) 55   (b) 75   (c) 65   (d) 85
(1 marks)
1(b)(iii) MACRO is used to _______ .
(a) Save memory   (b) Both a & c   (c) fast execution   (d) none of these
(1 marks)
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 marks)
1(b)(v) Which are not looping structures?
(a) For loop   (b) Do...while loop   (c) While loop   (d) if...else
(1 marks)
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 marks)
1(b)(vii) How many times the following code prints the string 'hello'
for (i=1 ;i<=50 ;i++);
(a)1   (b) Zero   (c) 50   (d) None of them
(1 marks)
2(a) List out types of software with Examples.(3 marks) 2(b) Explain flow chart with suitable example.(4 marks) 2(c) Write a C program to convert Celsius to Fahrenheit and vice versa.(7 marks) 3(a) Discuss the important of stdio.h header file.(3 marks) 3(b) Explain entry control loop and exit control loop with example.(4 marks) 3(c) Write a menu driven C program for simple calculator. Also draw flowchart.(7 marks) 4(a) Explain basic data types of C.(3 marks) 4(b) Explain break and continue statement with example.(4 marks) 4(c) Write a C program to display prime number between 1 to 100.(7 marks) 5(a) Explain Derive data types.(3 marks) 5(b) Explain getch(), getchar(), gets(), puts()(4 marks) 5(c) Write a C program to multiply two N X N Matrix.(7 marks) 6(a) Briefly discuss about scope of variable.(3 marks) 6(b) Explain Call by value and Call by reference.(4 marks) 6(c) Which type of problem can be solved by structure? Explain it with C program.(7 marks) 7(a) Explain dynamic memory allocation.(3 marks) 7(b) Write syntax of fseek() function and explain fseek(fp,-10,1) and 04 fseek(fp,10,0).(4 marks) 7(c) Write a program to read n different integer numbers from keyboard and calculate the sum using pointer.(7 marks)

Please log in to add an answer.