Download GTU BE/B.Tech 2019 Winter 1st And 2nd Sem New And Spfu 2110003 Computer Programming And Utilization Question Paper

Download GTU (Gujarat Technological University) BE/BTech (Bachelor of Engineering / Bachelor of Technology) 2019 Winter 1st And 2nd Sem New And Spfu 2110003 Computer Programming And Utilization Previous Question Paper

Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY

BE - SEMESTER ? I & II (NEW) EXAMINATION ? WINTER 2019
Subject Code: 2110003 Date: 07/01/2020

Subject Name: Computer Programming And Utilization
Time: 10:30 AM TO 01:00 PM Total Marks: 70

Instructions:
1. Question No. 1 is compulsory. Attempt any four out of remaining Six questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

Q.1 Objective Question (MCQ)
Mark

(a) 07
1. In which of the following languages, the instructions are written in the
form of 0s and 1s?

(a) Programming language (b) Machine language
(c) Assemble language (d) High-level language
2. The statements between a function body are indicated by:
(a) { } (b) ? ?
(c) \n (d) /**/
3. Which is a legal ?C? expression?
(a) a = [b + c]; (b) a = {(b + c)};
(c) a = (b + c); (d) a = {b*c};
4. What will the output of following C code be?
# include
int main()
{
int x = 1, y =1, z;
z = x++ +y;
printf (?%d, %d?, x, y);
}

(a) x = 2, y = 2 (b) x = 2, y = 1
(c) x = 1,y = 1 (d) x = 1, y = 2
5. How many operands does the conditional operator (?:) takes?
(a) Four (b) Two
(c) One (d) Three
6. In which of the following the loop is executed at least once?
(a) while (b) for
(c) do ? while (d) if
7. int x[5] = {3,4,5}
What will be the value of x[4]?

(a) 0 (b) 4
(c) 5 (d) 3

(b) 07
1. Which library function is used to compare two strings?
(a) strstr ( ) (b) strchr ( )
(c) strcmp ( ) (d) strlen ( )
2. A function declaration consists of four parts. Which of them is wrongly
mentioned?

(a) Terminating comma (b) Function type
(c) Function name (d) Parameter list
3. Which of following operators is used to access the value of the variable
using the pointer?

(a) * (b) ^
(c) % (d) &
FirstRanker.com - FirstRanker's Choice
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY

BE - SEMESTER ? I & II (NEW) EXAMINATION ? WINTER 2019
Subject Code: 2110003 Date: 07/01/2020

Subject Name: Computer Programming And Utilization
Time: 10:30 AM TO 01:00 PM Total Marks: 70

Instructions:
1. Question No. 1 is compulsory. Attempt any four out of remaining Six questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

Q.1 Objective Question (MCQ)
Mark

(a) 07
1. In which of the following languages, the instructions are written in the
form of 0s and 1s?

(a) Programming language (b) Machine language
(c) Assemble language (d) High-level language
2. The statements between a function body are indicated by:
(a) { } (b) ? ?
(c) \n (d) /**/
3. Which is a legal ?C? expression?
(a) a = [b + c]; (b) a = {(b + c)};
(c) a = (b + c); (d) a = {b*c};
4. What will the output of following C code be?
# include
int main()
{
int x = 1, y =1, z;
z = x++ +y;
printf (?%d, %d?, x, y);
}

(a) x = 2, y = 2 (b) x = 2, y = 1
(c) x = 1,y = 1 (d) x = 1, y = 2
5. How many operands does the conditional operator (?:) takes?
(a) Four (b) Two
(c) One (d) Three
6. In which of the following the loop is executed at least once?
(a) while (b) for
(c) do ? while (d) if
7. int x[5] = {3,4,5}
What will be the value of x[4]?

(a) 0 (b) 4
(c) 5 (d) 3

(b) 07
1. Which library function is used to compare two strings?
(a) strstr ( ) (b) strchr ( )
(c) strcmp ( ) (d) strlen ( )
2. A function declaration consists of four parts. Which of them is wrongly
mentioned?

(a) Terminating comma (b) Function type
(c) Function name (d) Parameter list
3. Which of following operators is used to access the value of the variable
using the pointer?

(a) * (b) ^
(c) % (d) &
4. What amongst the following determines the size of a union?
(a) Biggest member of the union (b) First member of union
(c) Sum of the sizes of all its
members
(d) Last member of union
5. Which of the following functions is used to release allocated memory
which is no longer required?

(a) dealloc ( ) (b) dropmem ( )
(c) free ( ) (d) release ( )
6. Which of the following functions allocates request size of bytes and
returns a pointer to the first byte of allocated space?

(a) calloc (b) free
(c) realloc (d) malloc
7. Which of the following functions reads an integer from a file?
(a) fseek ( ) (b) putw ( )
(c) fscanf ( ) (d) getw ( )

Q.2 (a) Write an algorithm to determine whether the given year is a leap year or
not.
03
(b)
(c)
What is a flow chart? How is it different from an algorithm?
What is various types of operator available in C.
04
07

Q.3 (a) State the difference between entry control loop and exit control loop. 03
(b)

(c)
What is difference between keywords and identifiers? Explain rules for
naming an identifier.
Write a program that reads a value n and generates the following pattern:
1
1 2 3
1 2 3 4 5
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8 9
04
07

Q.4 (a) Distinguish between the following pairs:
1) getchar and scanf functions
2) %s and %c specifications for reading.
3) %s and %[ ] specifications for reading.
03
(b)
(c)
Explain putchar() and puts() functions with suitable example.
Write a program to copy one string into another and count the number of
characters copied.
04
07

Q.5 (a) Compare for loop and while loop with illustrations. 03
(b)

(c)
Describe following string functions in C ? Language.
(1) strcpy( ) , (2) strcat( ) , (3) strlen( ) , (4) strcmp ( )
What is recursion? Write C program to find factorial (N) using recursive
Function?
04
07

Q.6 (a) State difference between call by reference and call by value. 03
(b)
(c)
What is pointer? Explain Array of pointer with example.
Write a function which accepts a string and returns the length of the string.
04
07


Q.7 (a) State difference between Union and Structure. 03
(b)
(c)
Explain getw() and putw() function with example.
What is file management? List the different file-management functions.
Explain the various file modes.
04
07
***********
FirstRanker.com - FirstRanker's Choice

This post was last modified on 20 February 2020