This download link is referred from the post: GTU BE 2019 Summer Question Papers || Gujarat Technological University
FirstRanker.com Enrolment No.
BE - SEMESTER-I & II (NEW) EXAMINATION - SUMMER-2019
Subject Code: 2110003 Date: 10/06/2019
--- Content provided by FirstRanker.com ---
Subject Name: Computer Programming and Utilization
Time: 10:30 AM TO 01:00 PM Total Marks: 70
Instructions:
- Question No.1 is compulsory. Attempt any four out of remaining six questions.
- Make suitable assumptions wherever necessary.
- Figures to the right indicate full marks.
--- Content provided by FirstRanker.com ---
Q.1
(a) Objective Question (MCQ) 07
- Which is output device?
- Barcode Reader
- LCD
- Scanner
- Keypad
--- Content provided by FirstRanker.com ---
- C-Language is .
- Machine Dependent
- Partially Machine Dependent
- Machine Independent
- None of above.
--- Content provided by FirstRanker.com ---
- Which one of following is volatile memory?
- SRAM
- EPROM
- Flash
- Hard disk
--- Content provided by FirstRanker.com ---
- How many times following loop will be rotated?
int a=10, b=1;
while(a>b)--- Content provided by FirstRanker.com ---
{ a— bt}- 5
- 10
- 4
- 1
--- Content provided by FirstRanker.com ---
- Which of the following is correct C statement to print variable a?
- printf(“a”);
- printf(“%d”, a);
- printf(“%d”);
- printf(“%a”);
--- Content provided by FirstRanker.com ---
- Which one of following loop rotates infinite time?
- for(; ;)
- do { } While(1<10);
- while (100)
- only a and c
- all of a, b, c
--- Content provided by FirstRanker.com ---
- Switch case statement cannot be applicable on data type.
- int
- char
- enumerated
- float
--- Content provided by FirstRanker.com ---
(b) Objective Question (MCQ) 07
- Which one is invalid variable name?
- int a
- templ
- case
- 1temp
--- Content provided by FirstRanker.com ---
- Which one of following statement doesn’t increment variable a?
- a++
- a+=1
- ++a
- a=+1
--- Content provided by FirstRanker.com ---
-
M=9; N=10;
X=M&&N;--- Content provided by FirstRanker.com ---
Y=M&N;- X=1,Y=8
- X=8,Y=8
- X=1,Y=1
- None of above
--- Content provided by FirstRanker.com ---
- What is output of following program ?
void main( )
{
int z=10;
float z = 10;--- Content provided by FirstRanker.com ---
printf(“%d”,z);
}- 10.00
- Compile time error
- 10
- Run time error
--- Content provided by FirstRanker.com ---
- The Function obtains block of memory run time.
- malloc()
- Both malloc() and calloc()
- calloc()
- free()
--- Content provided by FirstRanker.com ---
- Which of the following is true about FILE *fp
- FILE is keyword in C for representing files and fp is variable of FILE type.
- FILE is a structure and fp is pointer to structure of FILE type.
- FILE is stream
- FILE is buffered stream
--- Content provided by FirstRanker.com ---
- Array and Structure can contain elements of and data type respectively.
- same, different
- different, Same
- same, same
- different , different
--- Content provided by FirstRanker.com ---
Q.2 (a) Define (1) Higher Level Language (2) Lower Level Language (3) Machine Level Language 03
(b) Sketch flowchart to convert seconds into hour, minute and second. 04
(Hint : 3700 seconds => 1 hr, 1 minute , 40 second)
--- Content provided by FirstRanker.com ---
(c) Describe assignment, sizeof( ) and ternary operator with example. 07
Q.3 (a) Write C program to find area and perimeter of rectangle. 03
(b) Describe Enumurated data type with example. 04
(c) Write C program to get 20 data from user. Find sum, average, maximum and minimum number. 07
Q.4 (a) Write a program to add first n numbers. Get value of n from user. 03
--- Content provided by FirstRanker.com ---
(b) Describe switch case statement with example. 04
(c) Write a C program to display given pattern 07
1
12
123
--- Content provided by FirstRanker.com ---
1234
2345
Q.5 (a) What is dynamic memory allocation? Give advantages and disadvantages of it. 05
(b) Describe break and continue statement with suitable example. 04
(c) Write a C program to do following task. 07
--- Content provided by FirstRanker.com ---
- Take string from user and print in upper-case
- Find string length without using strlen() function.
Q.6 (a) Give merits and demerits of Union over structure. 03
(b) Design structure with following elements : 04
Name of employ, basic, da, ta , deduction , net_salary
--- Content provided by FirstRanker.com ---
Give the variety of way to access individual elements of structure..(c) Describe types of function based on arguments and return type. 07
Q.7 (a) Describe following file handling functions. 03
- fopen()
- fseek()
- fgetc()
--- Content provided by FirstRanker.com ---
(b) Write C program to copy content of file “D:\home\avs.txt” into new text file “ftel.txt” in E drive . 04
(c) Define Pointer. How to initialize integer pointer ? Describe pointer to array with example. 07
--- Content provided by FirstRanker.com ---
This download link is referred from the post: GTU BE 2019 Summer Question Papers || Gujarat Technological University