Name of the College : Government Engineering College
Department : Computer Science Engineering
Subject Name : Computer Programming
Year : May 2013
Degree : B.Tech
Sem : IV
Website : gecwyd.ac.in
Document Type : Model Question Paper
Download Model/Sample Question Paper : https://www.pdfquestion.in/uploads/pescemandya.org/4707-s4_ece_ns_may_2013.pdf
GECWYD Computer Programming Question Paper
lV Semester B.Tech. Degree (Reg./Sup./lmp. – lncluding Part Time) Examination, May 2013
(2A07 Admn. Onwards)
Related : Government Engineering College Microprocessors & Microcontrollers B.Tech Question Paper : www.pdfquestion.in/4704.html
Model Questions
PT2K6|2KO EE/EC/AEI 402-COMPUTER PROGRAMMiNG
Time: 3 Hours Max. Marks : 100
Answer all questions.
May 2013
l. a) Write notes syntax rules and comments in C programming with suitable examples. (8×5=40)
b) Write a program that prints a table of trigonometric values for sin( ), cos( ) and tan( ). The angles in your table should go from 0 to 2 rc in2A steps.
c) Write notes on the relationship between arrays and pointers with suitable examples.
d) Write notes on dynamic memory allocation with suitable examples.
e) Write notes on the different data types in java with suitable examples.
f) Write notes on constructors in java with suitable examples.
g) Write notes on strings and the most commonly used string methods in java with suitable examples.
h) Write notes on the byte streams with suitable examples.
ll. a) Write notes on the different types of statements available in C with suitable example demonstration for each. 15
OR
b) Write a C program to generate random numbers using functions. Don’t use the rand( ) function which is in the standard library. 15
lll. a) Explain in detailthe different string related operations and the string handling functions with suitable example programs to demonstrate each of them. 1S
OR
lV. a) Explain in detailwith suitable examples on how decision making is done with branching control structures in java. 15
OR
b)
V. a) Write the help of a good programming example, explain in detail the polymorphism and the overriding methods. With notes on single and multi dimensional arrays. An election is contested by 5 candidates. The candidates are numbered 1 to 5 and the voting is done by marking the candidate number on the ballot paper. Write a java program to read the ballots and count the number of votes casted for each candidate using an array variable ‘count’. ln case a number read is outside the range 1 to 5, the ballot should be considered as a ‘spoilt ballot” and the program should count the number of spoilt ballot.
OR
Explain in detail the different file related operations in java with suitable example programs.
Third Semester B.Tech. (Reg.lSupJlmp. -Including Part Time) Degree Examination,
November 2014
Computer Programming :
Time : 3 Hours
Max. Marks : 100
Instruction : Answer/ questions.
I. a) Write short notes on the different kinds of variables and data types in C with suitable examples.
b) Write short notes on FOR loop and WHILE loop in C with suitable example programs.
c) State the difference between single dimensional and multidimensional arrays with suitable example programs.
d) Write short notes on linked list with suitable examples.
e) Explain the inheritance in Java with suitable examples.
f) Write a Java program to generate Fibonacci series by getting a limit value from the user.
g) Write short notes on Graphics programming in Java.
h) Write short notes on input/output files in Java and how it is being managed. (8×5=40)
II. a) Explain in detail the scope rules of functions and the recursion in C programming with suitable examples programs. 15 OR
b) Explain in detail the different kinds of expressions and operators in C with suitable examples. Also explain the operator precedence and associativity in detail. 15
III. a) Write a C program with algorithm using structure to accept name, age and address of 6 people and print their details according to the ascending order of the age
OR
b) Write a C program with algorithm to accept a matrix and find its square and transpose.’
IV. a) Explain in detail the methods in Java. Give suitable programming examples. 15
OR
b) Explain in detail with suitable programming examples, the arithmetic operators and their operations in Java. 15
V. a) With the help of a suitable Java program, explain the Java packages in detail. 15
OR
b) Write a Java program for matrix multiplication and finding the transpose of a matrix using multi dimensional array. 15