Download OU (Osmania University) B.Tech (Bachelor of Technology) First Year (1st Year) 2013 June 2006 Programming In C And C++ Question Paper
FACULTY OF ENGINEERING & INFORMATICS
B.E. I ? Year (Main) (Common to All Branches) Examination s
June 2013
Subject: Programming in C and C++
Time: 3 Hours
Max.Marks: 75
Note: Answer all questions from Part A. Answer any five questions from Part B.
PART ? A (25 Marks)
1. Evaluate (00001000 & 11000101) A (11110000).
2. What is the difference between assembly language and machine language?
3. What is the value of the expression (0 < j < 1)? Does this expression achieve the
goal of checking that the value of j is between 0 and 1, exclusively? If so, say why? If
not, write an expression that does that.
4. Consider the following function:
void f (unsigned int n)
{
do {
putchar (`0' + (n % 10));
) while (n / = 10);
putchar (` WV);
)
What is the output of f (837)?
5. What is the importance or use of a static variable?
6. How does write mode differ from append mode when an existing file is being written
to?
7. What are inline functions?
8. List the operators that can not be overloaded.
9. What is the purpose of abstract base class?
10. Give the three standard I/O stream objects in C++.
PART ? B (50 Marks)
11.(a) Explain various steps in the development and execution of a typical C program.
(b) Write a program to reverse a given number.
12.(a) Write a function to search a number in a given list of numbers using linear search.
(b) Explain the usage of pointer variables in accessing elements in a multidimensional
array.
13.(a) Write a program that accepts student's roll number and name and stores the details
in a list of student records ordered roll-number-wise.
(b) What is a union? How do you declare and initialize a union in a C program?
.. 2.
FirstRanker.com - FirstRanker's Choice
Code No. 2006
FACULTY OF ENGINEERING & INFORMATICS
B.E. I ? Year (Main) (Common to All Branches) Examination s
June 2013
Subject: Programming in C and C++
Time: 3 Hours
Max.Marks: 75
Note: Answer all questions from Part A. Answer any five questions from Part B.
PART ? A (25 Marks)
1. Evaluate (00001000 & 11000101) A (11110000).
2. What is the difference between assembly language and machine language?
3. What is the value of the expression (0 < j < 1)? Does this expression achieve the
goal of checking that the value of j is between 0 and 1, exclusively? If so, say why? If
not, write an expression that does that.
4. Consider the following function:
void f (unsigned int n)
{
do {
putchar (`0' + (n % 10));
) while (n / = 10);
putchar (` WV);
)
What is the output of f (837)?
5. What is the importance or use of a static variable?
6. How does write mode differ from append mode when an existing file is being written
to?
7. What are inline functions?
8. List the operators that can not be overloaded.
9. What is the purpose of abstract base class?
10. Give the three standard I/O stream objects in C++.
PART ? B (50 Marks)
11.(a) Explain various steps in the development and execution of a typical C program.
(b) Write a program to reverse a given number.
12.(a) Write a function to search a number in a given list of numbers using linear search.
(b) Explain the usage of pointer variables in accessing elements in a multidimensional
array.
13.(a) Write a program that accepts student's roll number and name and stores the details
in a list of student records ordered roll-number-wise.
(b) What is a union? How do you declare and initialize a union in a C program?
.. 2.
Code No. 2006
-2-
14.(a) Write a C++ program to create a RATIONAL class and find the sum of two rational
numbers using operator overloading. Extend the program to add in' rational
numbers.
(b) How do you specify default arguments in function definition? Illustrate with an
example.
15.(a) Explain how virtual functions are used along with base class pointers to implement
run-time polymorphism.
(b) What is the difference between function overloading and function overriding? Explain
with an example.
16.(a) Write a C++ program using function template to perform addition, multiplication of
two matrices. It should support integer, float, and double data types.
(b) Illustrate scope rules of C language with suitable examples.
17. Write short notes on:
(a) Passing of multidimensional arrays as arguments to functions
(b) Conditional compilation
(c) Exception handling.
FirstRanker.com - FirstRanker's Choice
This post was last modified on 20 November 2019