Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Pps May 2018

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Seat No.: ________ Enrolment No.

___________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER– 1st / 2nd EXAMINATION (NEW) – SUMMER 2018

Subject Code: 2110003 Date: 23-05-2018


Subject Name: Computer Programming and Utilization
Time: 02:30 pm to 05: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. Keyboard is the ___________ type of device
(a) Input (b) Pointing (c) Output (d) Sound

2. The storage of a character variable is _________


(a)2 byte (b)1 byte (c) 8 byte (d) 0 byte

3. What should be written in the program to get newline on the screen?


(a) printf(“\n”); (b) echo “\\n”;
(c) printf(‘\n’); (d) printf(“ \\n “);

4. Which of these have highest precedence?


(a) ( ) (b) ++ (c) * (d) >>

5. For loop is _________.


(a)Function Controlled Loop (b)Entry Controlled Loop
(c) Exit Controlled Loop (d) None of these

6. In flowchart for what purpose ◊ symbol is used?


(a) Processing (b) Condition (c) Data flow (d) Input/output

7. The format string to accept a string is


(a)%c (b)%d (c)%f (d)%s

(b) 07
1. ______ is generally used to increase the apparent size of physical memory.
(a) Secondary memory (b) Virtual memory
(c) Hard-disk (d) Disks

2. File manipulation functions in C are available in which header file?


(a) streams.h (b) stdio.h (c) stdlib.h (d) files.h

3. What will be the output of following code.


{
int x = 10, y=15;
x = x++;
y = ++y;
printf(“%d, %d \n” , x, y);
}
(a) 10, 15 (b) 10, 16 (c) 11, 16 (d) 11, 15
4 Array index start at (a) 1 (b) User Defined (c) 0 (d) None of above

5. Which of the following operator is used to select a member of a structure


variable
(a) .(dot) (b) ,(comma)
(c) : (colon) (d) ;(semicolon)

6. Address stored in the pointer variable is of type _________


(a) Character (b) Integer
(c) Floating (d) Array

7. ____ converts the programs written in assembly language into machine


instructions.
(a) Machine compiler
(b) Interpreter
(c) Assembler
(d) Converter

Q.2 (a) Name the major components of computer system and give their function. 03
(b) List out the operators used in C language and explain any three with example 04
(c) 1. Define algorithm and explain different symbols used in flowchart. 03
2. Draw a flow chart that shows how to find root of quadratic equation 04
ax2+bx+c.

Q.3 (a) Describe the four basic data types. How could we extend the range of values 03
they represent?
(b) Define variable and constant. Explain different types of constants. 04
(c) Write a C Program to convert temperature from Fahrenheit to Celsius and vice 07
versa.

Q.4 (a) What is array? Give example and advantages of array. 03


(b) Explain: 1. Nesting if-else statement 2. Use of break statement 04
(c) Write a program in ‘C’ to print the following pattern using loop statement. 07
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

Q.5 (a) Explain how string is defined in C. List the various inbuilt string functions. 03
(b) What is pointer? Explain how pointers are declared and initialized. State its 04
advantages.
(c) Write a C program to read 10 numbers from user and store them in an array. 07
Display Sum, Minimum and Average of the numbers.

Q.6 (a) What is structure? Explain with example how to declare a structure and how to 03
initialize it.
(b) What is dynamic memory allocation? Show the use of malloc() and calloc() 04
function with their syntax.
(c) Explain nested structure and array of structure with example. 07

Q.7 (a) Explain recursive function with proper syntax with small example. 03
(b) Describe file management? List the various file handling operations in c 04
(c) Explain call by value (pass by value) and call by reference (pass by reference) 07
with examples in brief.
***********

You might also like