MCA113 Principles of Programming with C MCA Question Bank : bbdnitm.ac.in
Name of the Institute : Babu Banarasi Das National Institute of Technology & Management
Degree : MCA
Department : Computer Applications
Subject Code/Name : (MCA-113) Principles of Programming with C
Year : 1st
Semester : 1st
Document Type : Question Bank
Website : bbdnitm.ac.in
Download Model/Sample Question Paper : https://www.pdfquestion.in/uploads/bbdnitm.ac.in/3147-MCA-T113-PrinciplesofProgrammingwithC.pdf
BBDNITM Principles of Programming with C Question Paper
Unit I
1. After a programmer plans the logic of a program, she will next ____. :
a. understand the problem
b. test the program
c. translate the program
d. code the program
Related : Babu Banarasi Das National Institute of Technology & Management MCA513 Software Engineering MCA Question Bank : www.pdfquestion.in/3160.html
2 The process of walking through a program’s logic on paper before you actually write the program is called ____. :
a. desk-checking
b. flowcharting
c. pseudocoding
d. testing
3. Structured programs can be easily broken down into routines or ____ that can be assigned to any number of programmers. :
a. segments
b. modules
c. units
d. sequences
4. The ____ can be a useful tool when a program must be modified months or years after the original writing. :
a. flowchart
b. hierarchy chart
c. pseudocode
d. variable declaration
5. Structured Programming is used to describe :
a. how programs are to be written
b. processes in a DFD in a reasonably precise manner
c. how DFDs are used in data processing
d. data flows in DFD
6. The objective of using structured Programming is to :
a. describe computational procedures reasonably precisely which can be understood by any user
b. expand a DFD so that a user can understand it
c. develop algorithms corresponding to processes in a DFD
d. ease writing programs for DFDs
7. What is a compiler? :
a. A compiler does a conversion line by line as the program is run
b. A compiler converts the whole of a higher level program code into machine code in one step
c. A compiler is a general purpose language providing very efficient execution
8. What programming languages are classified as :
a. Basic, COBOL, FORTRAN,low-level languages and .C.
b. Machine code and Assembly Languages
c. Prolog 2, Expert Systems, Knowledge Based Systems.
9 Fortran does not permit recursion because :
a. It uses static allocation for storing variables
b. It uses dynamic allocation for storing variables
c. Stacks are not available in all machines
d. It is not possible to implement recursion on all machines
10. Which of the following language is case sensitive. :
a. Forton
b. Basic
c. C
d. None
11. Programming Language offers features to write functions to :
a. Facilitate to implementation of top-down logic
b. Enhance logical clarity
c. Avoid programming across program
d. None of above
12.You are asked to use to solve a problem given to you. How fast the computer solves your problem, depends on the :
a. Algorithm used
b. Language used for implementation
c. Programmer
d. Computer
13. Val is a well known :
a. Real-time language
b. Object-oriented language
c. Command language
d. Data-flow language
14. The principle that a function can always be replaced by its value (irrespective of the context) without changing the meaning is called :
a. Referential transparency
b. Orthogonality
c. Context-free
d. Unbinding
15. Which of the following comparisons between static and dynamic type checking is incorrect? :
a. Dynamic type checking slows down execution
b. Dynamic type checking offers more flexibility to programmers
c. Dynamic type checking is more reliable
d. Unlike static type checking, dynamic type checking is done during compilation
16. How can we represent the logic of the program? :
a. Program
b. Pseudocode
c. Algorithm
d. Flowchart
17. the period of time between an allocation and its subsequent disposal is called :
a. Scope
b. Dynamic binding
c. Lifetime
d. Longevity
18. for which of the following applications will you prefer a co-routine to a subroutine? :
a. Simulation of multi-processing
b. Complex searching process
c. Handling inter-leaved lists
d. None of the above
19. Binding cannot be done :
a. When separately compiled modules are being linked together
b. During loading
c. While writing a program
d. None of the above
20. Fortran does not permit recursion because :
d. It uses static allocation for storing variables
e. It uses dynamic allocation for storing variables
f. Stacks are not available in all machines
g. It is not possible to implement recursion on all machines
Unit II
1. What will be output if you will compile and execute the following c code? #define x 5+2 void main(){ int i; i=x*x*x; printf(“%d”,i); }
a. 343
b. 27
c. 133
d. Compiler error
e. None of above
2. What will be output if you will compile and execute the following c code? void main(){ int i=4,x; x=++i + ++i + ++i; printf(“%d”,x); }
a. 21
b. 18
c. 12
d. Compiler error
e. None of above
3. What will be output if you will compile and execute the following c code? void main(){ int a=10; printf(“%d %d %d”,a,a++,++a);}
a. 12 11 11
b. 12 10 10
c. 11 11 12
d. 10 10 12
e. Compiler error
4. C is which kind of language?
a. Machine
b. Procedural
c. Assembly
d. Object-oriented e. Strictly-typed
5. In a C expression, how is a logical AND represented?
a. @@
b. ||
c. AND.
d. &&
6. Which one of the following C operators is right associative?
a. =
b. ,
c. []
d. ^ e. ->
7. How do you include a system header file called sysheader.h in a C source file?
a. #include <sysheader.h>
b. #incl “sysheader.h”
c. #includefile <sysheader>
d. #include sysheader.h
e. #incl <sysheader.h>
8. Which of the following are the legal C statements:
1) N=?BBDNITM?;
2) A=b=3=4;
3) d=b^2- 4*a*c;
4) si=p * r * t /100;
a. 1
b. 4
c. 3
d. 1 & 4
9. How do printf()’s format specifiers %e and %f differ in their treatment of floating-point numbers?
a. %e always displays an argument of type double in engineering notation; %f always displays an argument of type double in decimal notation.
b. %e expects a corresponding argument of type double; %f expects a corresponding argument of type float.
c. %e displays a double in engineering notation if the number is very small or very large. Otherwise, it behaves like %f and displays the number in decimal
d. %e displays an argument of type double with trailing zeros; %f never displays trailing zeros.
10. A C variable cannot start with
1. An alphabet
2. A number
3. A special symbol other than underscore
4. 2 & 3, both
a. 3
b. 4
c. 2
d. None