C Programming
C Programming
Correct Answer
True
Your Answer
True
Select The Blank
Question
The address of the zeroth element can also be passed by just passing the
________ of the array.
Correct Answer
Name
Your Answer
Name
Select The Blank
Question
The link between the program and the operating systme is a structure called
________
Correct Answer
FILE
Your Answer
stream
Multiple Choice Multiple Answer
Question
When an array has both rows and columns it is called as:Correct Answer
2-D array , Matrix
Your Answer
2-D array
True/False
Question
When function is called by itself, it is known as recursive function.
Correct Answer
True
Your Answer
True
Select The Blank
Question
Correct Answer
while
Your Answer
while
Multiple Choice Multiple Answer
Question
Which of the following are basic data types in C?
Correct Answer
int , float , char
Your Answer
int , float , char
Multiple Choice Single Answer
Question
Use case steps are executed in :Correct Answer
Logical order
Your Answer
Serial order
Match The Following
Question
Correct Answer
Your Answer
Access Layer under OOA
Objects whose role is to communicate to data storage.
Objects whose role is to communicate to data storage.
Layered architecture under TSD
User interface tightly coupled with data
Objects with which user interacts.
Business Layer under OOA
Objects that represent business with data and behaviour.
Objects that represent business with data and behaviour.
UI layer under OOA
Objects with which user interacts.
User interface tightly coupled with data
Multiple Choice Multiple Answer
Question
What will be the output of the following main(){ char c='d';float f=1; printf("%c",
False
True/False
Question
If the value of a formal argument is changed in the called funciton, the
corresponding changes take place in the calling funciton.
Correct Answer
False
Your Answer
False
Multiple Choice Multiple Answer
Question
Which of the following operators have 1st priority in operations?
Correct Answer
*,/,%
Your Answer
*,/,%
True/False
Question
Real falls under secondary constant
Correct Answer
False
Your Answer
False
Select The Blank
Question
The address of a structure ________ be passed to a function.
Correct Answer
can
Your Answer
can
Select The Blank
Question
After goto, ________ has to be mentioned to pass the control.
Correct Answer
label name
Your Answer
label name
Match The Following
Question
Correct Answer
Your Answer
\r
carriage return
carriage return
\b
backspace
backspace
\f
form feed
form feed
\t
tab
carriage return
Multiple Choice Multiple Answer
Question
What will be the output of the following main(){ printf("%d", 7/22 + 25/5);
printf("%f", 7/22 + 25.0/5);}
Correct Answer
5 , 5.000000
Your Answer
5 , 5.000000
Multiple Choice Single Answer
Question
How much memory is occupied by each character in the array?
Correct Answer
one byte
Your Answer
one byte
True/False
Question
Control instructions are used to control the sequence of execution of various
statements in program
Correct Answer
True
Your Answer
True
Multiple Choice Multiple Answer
Question
Point out the errors if any. main ( ) { int i=100; while(i<=100); {printf("%d ",i ) ;
i--; }do; }
Correct Answer
do; is incorrect , no ; at the end of while
Your Answer
do; is incorrect , no ; at the end of while , it will turn into infinite loop
True/False
Question
One structure can be nested within another structure.
Correct Answer
True
Your Answer
False
Multiple Choice Multiple Answer
Question
Which of the following keywords are associated with switch statement?
Correct Answer
case , default , break
Your Answer
case , default , break
Multiple Choice Single Answer
Question
How many values a function can return at a time?
Correct Answer
one
Your Answer
one
Multiple Choice Single Answer
Question
How many nesting of structures is possible?
Correct Answer
many
Your Answer
two
Multiple Choice Multiple Answer
Question
What will be the output of the following main(){ int i = 1; char c='A'; printf("%d",i
* c); printf("%d",i * (c+2));}
Correct Answer
65 , 67
Your Answer
65 , 67
True/False
Question
Arithmetic instructions are used to control the sequence of execution of various
statements in program
Correct Answer
False
Your Answer
True
Multiple Choice Single Answer
Question
Which of the following functions of a floppy can be done using structure?
Correct Answer
formatting a floppy
Your Answer
coppying a data of a floppy
True/False
Question
A function can return only one value at a time.
Correct Answer
True
Your Answer
True
Select The Blank
Question
Just passing the address of the ________ element of the array to a function is as
good as passing the entire array to the function.
Correct Answer
Zeroth
Your Answer
First
Select The Blank
Question
________ is a way to assign an address of variable a to pointer p.
Correct Answer
p = &a;
Your Answer
p = &a;
Multiple Choice Multiple Answer
Question
What will be the output? main(){ char name[10]="String"; int j=strlen(name);
puts(name); printf("%d",j);}
Correct Answer
String , 6
Your Answer
String , 6
Select The Blank
Question
________ function finds first occurrence of a given character in a string.
Correct Answer
strchr
Your Answer
strchr
True/False
Question
Logical operators cannot be used with 'do' loop.
Correct Answer
False
Your Answer
False
True/False
Question
switch requires an integer expression.
Correct Answer
True
Your Answer
False
Select The Blank
Question
To declare a function choice() which returns a character value and has two integer
arguments, ________ statement is written.
Correct Answer
char choice(int,int);
Your Answer
char choice(int a, int b );
Multiple Choice Single Answer
Question
The language used for modeling and documenting system is :Correct Answer
UML
Your Answer
UML
Multiple Choice Single Answer
Question
Which of the following is valid declaration of an integer pointer 'no'?
Correct Answer
int *no;
Your Answer
int *no;
Multiple Choice Single Answer
Question
In sequence diagram, the horizontal arrowhead line shows
Correct Answer
Message 'from- to'
Your Answer
Message 'from- to'
Multiple Choice Multiple Answer
Question
Which agruments are required for fgets()?
Correct Answer
address of the string , maximum length , file pointer
Your Answer
file pointer
Multiple Choice Single Answer
Question
The collaboration diagram shows both :Correct Answer
Collaboration and sequence
Your Answer
Collaboration and sequence
Multiple Choice Single Answer
Question
A subscript of first element in an array is :Correct Answer
0
Your Answer
0
Multiple Choice Multiple Answer
Question
What will be the output of the following main(){ char c='ab'; printf("%c", c);
printf("%d",c);}
Correct Answer
a , 97
Your Answer
a , 97
Multiple Choice Single Answer
Question
Which of the following statement is wrong
Correct Answer
3 + a = b;
Your Answer
con = 'T' * 'A';
Multiple Choice Single Answer
Question
Which of the following form is possible to express the real constant
Correct Answer
Both fractional and exponential forms
Your Answer
ASCII form only
Select The Blank
Question
________ operator is used to refer to the structure element, when structure pointer
is declared
Correct Answer
->
Your Answer
-->
Multiple Choice Single Answer
Question
From expression - a = 6.6 / x + ( 5 * a + (3 * r)) / ( 5 / x ) which operation will be
performed first?
Correct Answer
(3*r)
Your Answer
(3*r)
Multiple Choice Multiple Answer
Question
'a' is an integer. 'p' is a pointer pointing to 'a'. Which of the following are valid
statements to display the address of 'a'?
Correct Answer
printf("%u",&a); , printf("%u",p);
Your Answer
printf("%u",&a); , printf("%u",p);
Select The Blank
Question
________ is logical NOT operator
Correct Answer
!
Your Answer
!
True
Your Answer
True
Select The Blank
Question
After the case, ________ expression is not allowed.
Correct Answer
float
Your Answer
arithmetic
Multiple Choice Single Answer
Question
What is a string?
Correct Answer
A character array
Your Answer
A character array
Select The Blank
Question
fopen() returns ________, if file is absent.
Correct Answer
NULL
Your Answer
error
Select The Blank
Question
________ is escape sequence for new line.
Correct Answer
\n
Your Answer
\n
True/False
Question
The keywords should not be used as variables.
Correct Answer
True
Your Answer
True
Select The Blank
Question
Operation between an integer and real always yields ________ result
Correct Answer
a real
Your Answer
a real
Multiple Choice Multiple Answer
Question
Which operators are used to access the individual structure element.
Correct Answer
. , ->
Your Answer
. , ->
Multiple Choice Multiple Answer
Question
Which of the following fuctions require a single string as a parameter?
Correct Answer
strlen , strlwr , strupr
Your Answer
strlen , strlwr , strupr
True/False
Question
If the file is absent, fopen() returns NULL.
Correct Answer
True
Your Answer
True
True/False
Question
When array elements are passed to a function with call by reference, function has
pointer arguments.
Correct Answer
True
Your Answer
False
Multiple Choice Single Answer
Question
If the function message() is to be called, which of the following statements is
correct?
Correct Answer
message();
Your Answer
message();
Select The Blank
Question
________ function is used to remove any data remaining in the buffer.
Correct Answer
fflush
Your Answer
flush
Match The Following
Question
Correct Answer
Your Answer
Address of the last element
Always size of array - 1
Always size of array - 1
Call by value in function
Passing values of array elements
Passing values of array elements
Call by reference in function
Passing addressess of array elements
Passing addressess of array elements
Base address
Address of 1st element in an array
Address of 1st element in an array
Multiple Choice Multiple Answer
Question
Which of the following are valid types of function calls?
Correct Answer
Question
Which of the following is valid statement to declare a string?
Correct Answer
char name[20];
Your Answer
char name[20];
Multiple Choice Single Answer
Question
When you pass an array as an argument to a function, what actually gets passed?
Correct Answer
Address of the first element of the array [base address]
Your Answer
Address of the first element of the array [base address]
Select The Blank
Question
Break / continue is generally associated with ________.
Correct Answer
if
Your Answer
for
True/False
Question
A value of object changes when event occurs.
Correct Answer
True
Your Answer
True
Select The Blank
Question
Booch emphasises development of mechanisms with ________ model.
Correct Answer
Data
Your Answer
Data
Select The Blank
Question
True
Select The Blank
Question
The set of statements belonging to a function are enclosed within a pair of
________.
Correct Answer
braces
Your Answer
braces
Multiple Choice Multiple Answer
Question
What will be the output of the following main(){ char c='ab',d='A'; printf("%d",
c+d); printf("%d",2*(c+d));}
Correct Answer
162 , 324
Your Answer
162 , 324
Select The Blank
Question
In analytical phase ________ diagrams are achieved representing a system.
Correct Answer
Static
Your Answer
Logical
Multiple Choice Single Answer
Question
Name the header file in which FILE is defined :Correct Answer
stdio.h
Your Answer
conio.h
Multiple Choice Multiple Answer
Question
What will be the output? main ( ) { int suite = 3 ; switch (suite) { case 1:printf(
"\nDiamonds" ) ; case 2:printf( "\nSpade" ) ; default :printf( "\nHeart" ) ; }printf
("\nI thought one wears a suite") ; }
Correct Answer
Heart , I thought one wears a suite
Your Answer
Heart , I thought one wears a suite
Multiple Choice Multiple Answer
Question
What will be the output of the following main(){ int a = 1;float f=1; printf("%d", a
* f); printf("%f", a * f); printf(%f",(a + f ) * 100);}
Correct Answer
0 , 1.000000 , 200.000000
Your Answer
0 , 1.000000 , 200.000000
Multiple Choice Single Answer
Question
A state chart diagram shows two states, one of the state and the other of
Correct Answer
Transition between two states
Your Answer
Transition between two states
Multiple Choice Single Answer
Question
In this the condition is specified at the end of the loop :Correct Answer
do
Your Answer
do
True/False
Question
The return statement should present at the end of the called function.
Correct Answer
False
Your Answer
True
True/False
Question
While passing an array elements to a function by call by value we pass values of
True/False
Question In TSD based client server architecture, the user interface is loosely
coupled with the data.
Correct Answer False
Your Answer False
True/False
Question If the value of a formal argument is changed in the called funciton, the
corresponding changes take place in the calling funciton.
Correct Answer False
Your Answer False
True/False
Question Functions are written to avoid rewriting the same section of code which
requires oftenly.
Correct Answer True
Your Answer True
True/False
Question switch requires an integer expression.
Correct Answer True
Your Answer True
Question Use case defines and describes what happens in the system in logical
order. This is termed as :Correct Answer System behaviour
Your Answer System analysis
True/False
Question One structure can be nested within another structure.
Correct Answer True
Your Answer True
True/False
Question Standard I/O functions are nothing but stream I/O functions.
Correct Answer True
Your Answer True
True/False
Question Default statement is optional in switch.
Correct Answer True
Your Answer False
True/False
Question Formal and Actual arguments cannot be same.
Correct Answer False
Your Answer False
True/False
Question Logical operators cannot be used with 'do' loop.
Correct Answer False
Your Answer False
True/False
Question The sequence diagram shows flow of behaviour and collaboration of
objects.
Correct Answer False
Your Answer True
Question The interaction diagrams are not good enough if behaviour of object is
conditional and gets into a loop.
Correct Answer True
Your Answer False
True/False
Question The control instructions determine the 'flow of control' in a program.
Correct Answer True
Your Answer True
Multiple Choice Multiple Answer
Question What will be the output? main ( ) { int suite = 3 ; switch (suite) { case
1:printf( "\nDiamonds" ) ; case 2:printf( "\nSpade" ) ; default :printf( "\nHeart" ) ;
}printf ("\nI thought one wears a suite") ; }
Correct Answer Heart , I thought one wears a suite
Your Answer Heart , I thought one wears a suite
Select The Blank
Question After the case, ________ _expression is not allowed.
Correct Answer float
Your Answer arithmetic
Multiple Choice Multiple Answer
Question What will be the output of the following main(){ int a=10,b=20,c;
printf("%d", a + b); printf("%d", c+a); c=a;}
Correct Answer 30 , garbage value
Your Answer 30 , garbage value
Multiple Choice Single Answer
Question A function which is called is refered as :Correct Answer called function
Your Answer called function
Multiple Choice Single Answer
Question Which of the following is a unformatted console I/O function to get a
string input?
Correct Answer gets
Your Answer gets
Select The Blank
Question ________ is a output statement in C
True/False
Question Functions are written to avoid rewriting the same section of code which
requires oftenly.
Correct Answer True
Your Answer True
Select The Blank
Question ________ is a person or device that uses the system.
Correct Answer User
Your Answer User
Select The Blank
Question ________ function is used to convert a string to upper case
Correct Answer strupr
True/False
Question In collaboration diagrams, the connection between objects is shown.
Correct Answer True
Your Answer True
Multiple Choice Multiple Answer
Question What will be the output of the following main(){ char c='d'; printf("%d",
c); printf("%d", c * (7/22));}
Correct Answer 100 , 0
Your Answer 100 , 31
Multiple Choice Multiple Answer
Question What will be the output of the following main(){ char c='d';float f=1;
string?
Correct Answer puts
Your Answer puts
True/False
Question Primary and Secondary are the two types of constants in C.
Correct Answer True
Your Answer False
Multiple Choice Multiple Answer
Question What will be the output? main(){ int i; void show(int); for(i=65;i<68;i++)
show(i);} void show(int i){ printf("\n%c",i);}
Correct Answer A , B , C
Your Answer A , B , C
Select The Blank
Question Arithmatic operations can be performed on characters where their
________ value is used.
Correct Answer ASCII
Your Answer ASCII
Select The Blank
Question The keyword ________ is followed by an interger or a character constant.
Correct Answer case
Your Answer case
Match The Following
Question Correct Answer Your Answer
% Modulus operator Modulus operator
<, >, <=, >= etc. Relational operator Relational operator
= = Comparison for equal value Comparison for equal value
Logical opertor - OR Logical opertor - OR
True/False
Question Initialisation of the conditional variable is necessary for while loop.
Correct Answer True
Your Answer True
Multiple Choice Single Answer
Question What is the another name of 'value at address' operator?
Correct Answer indirection
Your Answer indirection
True/False
Question If break is not used in cases, compiler gives an error.
Correct Answer False
Your Answer False
Multiple Choice Single Answer
Question If 'return' statement is written without any value, which of the following is
used for empty value?
Correct Answer nothing, only 'return;' has to be written
Your Answer nothing, only 'return;' has to be written
Multiple Choice Single Answer
Question C language has been developed at
Correct Answer AT & T Bell Labs, USA
Your Answer AT & T Bell Labs, USA
Multiple Choice Multiple Answer
Question Which of the following modes are used to read from a file?
Correct Answer r , r+
Your Answer r , r+ , w
Select The Blank
Question Booch emphasises development of mechanisms with ________ model.
Correct Answer Data
Your Answer Data
True/False
Question The set of statements belongining to a function are enclosed within a pair
of braces.
Correct Answer True
True/False
Question Middle Level Language is the language which has both good programming
efficiency and a good machine efficiency
Correct Answer True
Your Answer True
Multiple Choice Single Answer
Question Which function is used to open a file?
Correct Answer fopen
Your Answer fopen
Match The Following
Question Correct Answer Your Answer
%c Format specification for a character Format specification for a character
gets() To accept a string from keyboard To accept a string from keyboard
puts() To display a string on the screen To display a string on the screen
%s Format specification for a string Format specification for a string
True/False
Question Once file is open it is always refered by its FILE pointer
Correct Answer True
Your Answer True
True/False
Question While passing an array elements to a function by call by value we pass
values of array elements to the function
Correct Answer True
Your Answer True