0% found this document useful (0 votes)
24 views5 pages

WWW - Manaresults.Co - In: Computer Programming

The document contains examination papers for the I B. Tech II Semester Regular Examinations in Computer Programming, dated August 2014. Each paper is divided into Part-A, which is compulsory, and Part-B, from which students must answer three questions. The questions cover various programming concepts including data types, control structures, functions, pointers, and file handling.

Uploaded by

shravankumarx7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views5 pages

WWW - Manaresults.Co - In: Computer Programming

The document contains examination papers for the I B. Tech II Semester Regular Examinations in Computer Programming, dated August 2014. Each paper is divided into Part-A, which is compulsory, and Part-B, from which students must answer three questions. The questions cover various programming concepts including data types, control structures, functions, pointers, and file handling.

Uploaded by

shravankumarx7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Subject Code: R13205/R13 Set No - 1

I B. Tech II Semester Regular Examinations August - 2014


COMPUTER PROGRAMMING
(Common to ECE, EEE, EIE, Bio-Tech, E Com.E, Agri. E)
Time: 3 hours Max. Marks: 70
Question Paper Consists of Part-A and Part-B
Answering the question in Part-A is Compulsory,
Three Questions should be answered from Part-B
*****
PART-A

1.(i) What is the output of the following code, Justify your answer.
int main()
{
int x=1, y=5;
printf(“%d”, ++x +y);
return 0;
}
(ii) What is the meaning of 3<j &&j<5? Is it equivalent to (3<j) && (j<5)?
(iii) What is the difference between iterative and recursive execution?
(iv) Write a function that checks whether a given year is leap year or not.
(v) Demonstrate the usage of ‘typedef’?
(vi) How is a file pointer declared?
[3+4+3+4+4+4]
PART- B

2.(a) What are the relational operators? Explain with examples.


(b) How is data type promotion done in an expression?
[8+8]
3.(a) Illustrate the use of special control constructs goto, break, continue and return.
(b) Give the format for conditional operator. When is it used?
(c) What is the purpose of the comma operator? Within which control statement does the
comma operator usually appear?
[6+5+5]
4.(a) Illustrate the storage classes extern, static and auto with an example.
(b) Define a function for determining whether a given character is a vowel or not.
[8+8]
5.(a) What are the functions for dynamic memory management? Explain.
(b) How do you use a pointer as a formal parameter of a function which is designed to
manipulate an array? Explain.
[8+8]

Page 1 of 2
WWW.MANARESULTS.CO.IN
||''|''||''||''''''|
Subject Code: R13205/R13 Set No - 1

6.(a) What is an enumerated data type? Explain with example.


(b) Declare a structure to store the following information of an employee:
employee code
employee name
salary
department number
hiredate
Write a program to store the data of ‘n’ employees where ‘n’ is given by user
dynamically.
(i) Use a function to display the employee records in ascending order according to their
salary.
(ii) Use a function to display the department wise employee records.
[6+10]
7.(a) What are the functions used for accessing files randomly? Explain with examples.
(b) Write a program that opens a file and deletes the blank spaces.
[8+8]

Page 2 of 2

WWW.MANARESULTS.CO.IN
||''|''||''||''''''|
Subject Code: R13205/R13 Set No - 2
I B. Tech II Semester Regular Examinations August - 2014
COMPUTER PROGRAMMING
(Common to ECE, EEE, EIE, Bio-Tech, E Com.E, Agri. E)
Time: 3 hours Max. Marks: 70
Question Paper Consists of Part-A and Part-B
Answering the question in Part-A is Compulsory,
Three Questions should be answered from Part-B
*****
PART-A

1.(i) Explain why the following identifiers are invalid?


(a) %age marks (b) x.y (c) amount_in_$ (d) marks(1)
(ii) What are the initial values of array elements if we do not explicitly initialize the array?
(iii) Which storage classes do not initialize variables to default values? Why?
(iv) Is it possible to assign a constant to a pointer variable?
(v) How is a structure different from an array?
(vi) What is the use of feof ( ) function?
[4+4+4+4+3+3]
PART- B

2.(a) What is an integer constant, floating constant and character constant? Give valid examples.
(b) What are the different data type modifiers available in C language?
[8+8]
3.(a) Write conditional expressions to perform the following operations:
Given two numbers, calculate their sum if both numbers are either odd or even;
otherwise.
(b) Write a program segment using if statement to perform the following operation:
Given the coordinates centers of two circles and their radii, determine whether they
overlap or not.
[8+8]
4.(a) Explain in detail about self-referential structures with an example.
(b) Demonstrate the scope rules in blocks of a program.
[8+8]
5.(a) What is call by address? Consider the swap function for swapping two numbers and
illustrate how call by address is done?
(b) What is meant by dereferencing? How it is performed in ‘C’. [8+8]

6.(a) What is the main reason for using structure? What special keyword is used in defining a
structure? Give syntax for structure
(b) Demonstrate how one structure can be copied to another of the same type. [8+8]

7.(a) Illustrate the character input/output functions with suitable examples.


(b) Demonstrate the use of fread( ) and fscanf( ) for reading sequentially from a disk. [8+8]

Page 1 of 1
WWW.MANARESULTS.CO.IN
||''|''||''||''''''|
Subject Code: R13205/R13 Set No - 3
I B. Tech II Semester Regular Examinations August - 2014
COMPUTER PROGRAMMING
(Common to ECE, EEE, EIE, Bio-Tech, E Com.E, Agri. E)
Time: 3 hours Max. Marks: 70
Question Paper Consists of Part-A and Part-B
Answering the question in Part-A is Compulsory,
Three Questions should be answered from Part-B
*****
PART-A
1.(i) Write code to output the numbers from 1 to 10 using for loop.
(ii) Can we copy an array using the assignment operator? Justify your answer.
(iii)Write a function to exchange two numbers without using temporary variable.
(iv) What is the difference between malloc ( ) and calloc ( )?
(v) What is wrong with the following code:
struct {
char person_ name[20];
int num;
} name=” xyz”, 90;
(vi) What is meant by flushing of a file? [4+3+4+3+4+4]

PART- B
2.(a) Declare the variables and write the assignment statements to calculate the sum of squares
of the differences between each pair of three given numbers.
(b) Determine the sum and average of n numbers entered from keyboard. With a flowchart
represent the same.
[8+8]
3.(a) Give the control flow diagram of the for loop. How is the execution of ‘for’ loop
proceeds?
(b) Write a program to find the factorial of a given integer number using ‘while’ loop.
[8+8]
4.(a) Describe the call by value mechanism with examples.
(b) Write a function that uses a function to perform the addition of two matrices.
[8+8]
5.(a) Where is a pointer stored? What is a void pointer?
(b) Demonstrate the usage of character arrays with an example.
[8+8]
6.(a) Write a program using a pointer to structure illustrating the initialization of the members
in the structure.
(b) How are the members of a ‘Union’ are initialized and accessed? [8+8]

7.(a) What is stream? Describe two different methods of creating a stream oriented data file.
(b) How can the program detect that it has reached the end of the file?
(c) Explain about procedure and order of evaluation of operators in ‘C’. [5+5+6]
Page 1 of 1
WWW.MANARESULTS.CO.IN
||''|''||''||''''''|
Subject Code: R13205/R13 Set No - 4

I B. Tech II Semester Regular Examinations August - 2014


COMPUTER PROGRAMMING
(Common to ECE, EEE, EIE, Bio-Tech, E Com.E, Agri. E)
Time: 3 hours Max. Marks: 70
Question Paper Consists of Part-A and Part-B
Answering the question in Part-A is Compulsory,
Three Questions should be answered from Part-B
*****
PART-A

1.(i) What are formatted input and output statements in C? Give suitable examples.
(ii) Comment on the size of pointer to different datatypes (int *, char *, float *).
(iii) Identify the error in the following function.
int small ( int a, int b )
{ int small=a;
if ( b < small ) small=b;
}
(iv) What is meant by flushing of a file?
(v) Difference between do-while and while-do constructs.
(vi) What is the use of rewind( ) function?
[4+4+4+3+4+3]
PART- B

2.(a) Draw a flowchart for printing the sum of even terms contained within 0 to 20.
(b) Write short notes on symbolic and high level languages.
[8+8]
3.(a) Describe about two dimensional array of strings, initializing the sized and unsized two
dimensional arrays and accessing elements in such arrays.
(b) Write a program to merge two sorted arrays into another array in a sorted order.
[8+8]
4.(a) What is a function and in what way does its use benefits a program?
(b) Write a program that uses a function to swap values stored in two integer variables to
understand the concept of local and global variables.
[6+10]
5.(a) How are variables passed to a function? Explain.
(b) When should be pointers used? What are the reasons?
[8+8]
6.(a) Define structure tag and explain what is its purpose?
(b) Write a program using a pointer to structure illustrating the initialization of the members
in the structure.
[8+8]
7.(a) Mention the different file opening modes that can be used with fopen ( ).
(b) Compare sequential versus random file access.
[8+8]
WWW.MANARESULTS.CO.IN Page 1 of 1

||''|''||''||''''''|

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy