Center for Development of Advanced Computing
C & C++ Questions
C-DAC Previous Year Question paper
C-DAC Previous Year Question paper
Question 1:The break statement is used to exit from
- a DO loop
- a FOR loop
- a SWITCH statement
- all of above
- none of above
Question 2:In which statements, does a CONTINUE statement cause the control to go directly to the test condition and then continue the looping process?
- FOR and WHILE
- WHILE and IF-ELSE
- DO-WHILE and IF-ELSE
- While and DO-WHILE
- None of above
Question 3:The advantage of a SWITCH statement over an ELSE-IF statement
- A default condition can be used in the SWITCH
- The SWITCH is easier to understand
- Several different condition can cause one set of statements to be executed in a SWITCH
- Several different statements can be executed in a SWITCH
- None of above
Question No 4:The comma operator (,) is primarily used in conjunction with
- FOR statement
- IF-ELSE statement
- DO-While statement
- All of above
- None of above
Question No 5:The GOTO statement is used to
- Permit two different expressions to appear in situation where only one expression would ordinarily used
- Terminate loops or to exit from a switch
- Alter the normal sequence or program execution by transferring control to some other part of the program
- Carry out a logical test and then take one of two possible actions, depending upon the outcome of a test
- None of above
Question No 6:The traditional way to create an infinite loop in C is
- FOR ( ; ; )…
- IF (=) BREAK;
- WHILE ()…
- All of above
- None of above
Question No 7:The difference between the declaration of an external variable and its definition is
- A declaration causes storage space to be allocated to variable while a definition announces variable’s properties
- A declaration announces the properties of a variable while a definition also causes storage to be allocated
- A declaration announces the properties of a variable while definition only causes storage to be allocated
- A declaration uses storage space to be allocated to variable while a definition also announce its properties.
- None of above
Question No 8:The comma operator (,) is used to
- Permit to different expressions to appear in situation where only one expression would ordinarily be used
- Terminate loops or to exit from switch
- Alter the normal sequence of program execution by transferring control to some other parts of the program
- Carry out the logical test and then take one of two possible actions, depending upon the outcome of the test
- None of above
Question No 10:The recursive form of algebraic formula
y=(x1 + x2 + …+xn) is
- Y = x + n-1 xi i=1
- Y= xn + n xi i=1
- Y=xn+xi
- Y = xn + n-1 i=1 xi
- None of above
Question No 11:Which one of the following, is a storage class specification in C?
- Automatic
- External
- Static
- All of above
- None of above
Question No 12:Given these variables
char ch;
short i;
unsigned long ul;
float f;
The overall type of this expression is
- Char
- Unsigned
- Float
- Double
- None of above
Question No 13:What will this program display?
#include <stdio.h>
main()
{
float f;
f=10/3;
printf ("%f",f);
}
- 3.3
- 3.0
- 3
- 3.1
- None of above
Question No 14:The most common use of the one-dimensional array in C is the
- String
- Character
- Data
- Functions
- None of above
Question No 15:The string related function supplied by C standard library is
- strcpy()
- strcat()
- strcmp()
- All of above
- None of above
Question No 16:Find out the incorrect statement for strlen() function
- Returns the length of a string
- Does not count the null terminator
- Has general form strlen();
- All of above
- None of above
Question No 17:C provides loop constructs for performing loop operations. They are
- The WHILE statement
- The DO statement
- The FOR statement
- All of above
- None of above
Question No 18:Arrays that do not have their dimensions explicitly specified are called
- Unsized arrays
- Undimensional arrays
- Initialized arrays
- No size of arrays
- None of above
Question No 19:What is wrong with the given fragment?
- The size of the array is not specified
- Declaration must have float in place of int
- The list must be enclosed between curly braces
- All of the above
- None of the abov
Question No 20:A variable that holds the memory address of another object is called a
- integer
- pointer
- constant
- memory variable
- None of the abov
Question No 21:In C, the address of m's memory location can determined by the expression
- *m
- m&
- &m
- m*
- None of the abov
Question No 22:Main() is an example of
- library function
- user-defined function
- header
- statement
- None of the above,
Question No 24:The header file 'ctype.h' can be used for
- providing links to assembly language for calls
- providing diagnostic and debugging assistance
- providing support for string handling functions
- providing character type identification (Boolean) and translation
- None of the above.
Question No 25:The header file 'math.h* can be used for
- providing links to assembly language for calls
- providing diagnostic and debugging assistance
- providing support for string handling functions
- All of the above
- None of the above
META TAGS:- CDAC PREVIOUS YEAR QUESTION PAPERS I CDAC LAST 5 YEARS EXAM PAPERS I CDAC SOLVED EXAM PAPERS I CDAC LAST 10 YEARS SOLVED PAPERS I DOWNLOAD CDAC QUESTION PAPERS I CDAC PREVIOUS YEAR SOLVED PAPERS I COMPUTER SCIENCE SOLVED PAPERS I COMPUTER SCIENCE SAMPLE PAPERS I CDAC COMPUTER SCIENCE QUESTIONS I CDAC C AND c++ QUESTIONS I CDAC SAMPLE QUESTIONS I CDAC MODEL PAPERS I CDAC LATEST EXAM PAPERS I CDAC PREVIOUS YEAR SOLVED PAPERS I CDAC STUDY MATERIALS I
0 comments:
Post a Comment