Programming for Problem Solving - B.Tech 2nd Semester Exam., 2019 (New Course)
Programming for Problem Solving
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
-
What will be the data type of result of the following operation?
(float)a * (int)b/(long)c * (double)d) -
What does the following declaration mean?
int (*ptr) [10]; -
Which of the following is a correct format for declaration of function?
-
The value obtained in the function is given back to main by using ______ keyword.
-
Which data type is most suitable for storing a number 65000 in a 32-bit system?
-
Which of the following declarations is not supported by C?
-
Which of the following is an invalid if-else statement?
-
A local variable declaration with no storage class specified is by default
-
Automatic variables are initialized to
-
The getchar() function is defined in ______ header file.
-
What do you understand by the term 'problem solving'? How can programming be used to do problem solving?
-
Discuss about the components of computer system. How are they involved in computer programming activity?
-
Write the algorithm for exchanging the values of two variables.
-
Differentiate between flowchart, pseudo-code and source code.
-
What are the outcomes of compilation of a program? Discuss in detail.
-
What are constants? List the types of constants as defined in C language.
-
What are the libraries? How are they different from header files?
-
What is an array? Write a C program to find the average of 10 numbers of an array.
-
What do you understand by the operator precedence? Explain.
-
Define storage classes of C with some appropriate examples.
-
What is branching? What are the possible types of branching and the C statements used for such type of branching? Give a detailed explanation with example.
-
Write a C program to calculate 12!/8. The operation is factorial of 12, divided by 8. Also comment by examine whether the algorithm used is efficient.
-
What is type casting? Explain its classification through examples.
-
Give the purpose, proper syntax and other variants of 'getch()' and 'gets()' functions.
-
How can an array of numbers be passed to function as parameter? Write an example C program in support.
-
What is dynamic memory allocation in C?
-
Differentiate between the following:
(i) Structures and Union
(ii) Formatted and Unformatted data files -
What is a file? List different operations performed on file. How are they achieved? Explain.
-
Write a C program to create an array of structures named "STUDENT" with fields, Name, Cell no, Address, and Marks. How to show any student record using this structure?
-
Which of the sorting algorithm is better than other and why? Explain.
-
Write C program for merge sort algorithm.