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

Computer Programming & Utilization - Jan 2014

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) Draw block diagram of a Computer. Explain the function of each block.(7 marks) 1 (b) Explain various symbols used in a flowchart. Draw a flowchart to read 10 integers and find and print the sum of these integers.(7 marks) 2 (a) Explain: Software, Hardware, Higher level Language and Compiler.(7 marks) 2 (b) State the important features of C language. Also, explain the basic structure of a C program. (7 marks) 2 (c) Write a program in C for finding sum of 1 to k. The number k should be read from the keyboard using scanf(). (7 marks) 3 (a) Explain arithmetic, relational and logical operators used in C Language.(7 marks) 3 (b) Write C program to find and print prime numbers between the numbers 1 to n, where the number n should be read from the keyboard. (7 marks) 3 (c) Compare while loop and for loop with illustrations.(7 marks) 3 (d) A and B are two n X n matrices. Write a C program to read both A and B matrices, add them and print the resultant C matrix. The maximum value n may be taken as 9. (7 marks) 4 (a) Describe following string functions in C-Language.
(1) strcpy( )
(2) strcat( )
(3) strcmp()
(7 marks)
4 (b) Write a program to that read two strings and concatenate them using appropriate string function and print the resulting string. (7 marks) 5 (a) What are advantages of user defined functions?
Explain in this context with examples (i) function prototype (ii) call by value
(7 marks)
5 (b) Write a C program to find factorial of n using recursive use of functions. (7 marks) 6 (a) What is a "structure in C? Write a program which declares a structure named student with roll_no, name, address and marks[5]. The structural element marks should be an array to store marks in each of the five subjects. The program then should read and print data for n student using proper format. (7 marks) 6 (b) What are pointers in C? Give their benefits. Write a program to read integer numbers in an m[10] array, and print the elements of this array using pointers. (7 marks) 7 (a) Explain showing proper syntax, following file operations: fprintf() (ii) fscanf() (iii) putc() (iv) getc() (7 marks) 7 (b) Writ a program to read merit marks of 100 students from keyboard in an m[100] array, and store this m array on DATA file, and to read these marks from the DATA file and display them on the monitor. (7 marks)

Please log in to add an answer.