Sei sulla pagina 1di 22

Multiple Choice Single Answer

Question
When the method is chosen and performed on the data, the object status changes.
The static object assumes :-
Correct Answer
Dynamic state
Your Answer
Static state

True/False
Question
Functions are written to avoid rewriting the same section of code which requires
oftenly.
Correct Answer
True
Your Answer
True

Multiple Choice Single Answer


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 designing

Multiple Choice Single Answer


Question
Due to complex interactions, interaction diagrams are usually difficult to draw &
read. The remedy for this is :-
Correct Answer
To split the use cases into smaller activities or tasks with specifi goals
Your Answer
To split the use cases into smaller activities or tasks with specifi goals

True/False
Question
A structure variable can be passed to a function.
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
________ is an assignment operator.
Correct Answer
=
Your Answer
==

Multiple Choice Multiple Answer


Question
Two dimensional array has :-
Correct Answer
Rows , Columns
Your Answer
Rows , Columns

Multiple Choice Single Answer


Question
A single dimensional array has :-
Correct Answer
Only rows
Your Answer
Dimension never refers to no. of rows and columns.

Select The Blank


Question
Operation between ________ and integer always yields an integer result
Correct Answer
an integer
Your Answer
an integer

Multiple Choice Single Answer


Question
Studying system domain, identifying classes & objects with their properties and
expressing them with eight notations/diagrams is called as
Correct Answer
Object modeling of system.
Your Answer
Object modeling of system.

True/False
Question
There is no three dimensional array
Correct Answer
False
Your Answer
True

Multiple Choice Single Answer


Question
Which function is used to close a file?
Correct Answer
fclose
Your Answer
fclose

Multiple Choice Single Answer


Question
In logical AND :-
Correct Answer
Both the conditions have to be TRUE
Your Answer
Both the conditions have to be TRUE

Multiple Choice Single Answer


Question
The language used by UA to develop Object Oriented systems is :-
Correct Answer
UML
Your Answer
UML

Multiple Choice Single Answer


Question
A sequence diagram shows an interaction arranged in time sequence in its :-
Correct Answer
Logical order
Your Answer
Logical order

Multiple Choice Single Answer


Question
In this the condition is specified at the beginning of the loop :-
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", c); printf("%f", c * f);}
Correct Answer
d , 100.000000
Your Answer
d , 100.000000

Multiple Choice Multiple Answer


Question
Which tasks are performed on opening a file in read mode?
Correct Answer
searches a file on the disk , loading a file into memory in presense and returning
NULL in case of absent , setting up a character pointer to the first character
Your Answer
searches a file on the disk , loading a file into memory in presense and returning
NULL in case of absent , setting up a character pointer to the first character

Multiple Choice Multiple Answer


Question
Which of the following functions are used to set all / n characters of a string to
a given character?
Correct Answer
strset , strnset
Your Answer
strchr

Multiple Choice Single Answer


Question
This funciton is used to convert a string to lowercase :-
Correct Answer
strlwr
Your Answer
strlwr

Multiple Choice Multiple Answer


Question
Which of the following functions are used for formatted input/output operations?
Correct Answer
printf , scanf
Your Answer
printf , scanf , getch()

Select The Blank


Question
Any C statement ends with ________.
Correct Answer
;
Your Answer
;

Multiple Choice Single Answer


Question
The approach of object oriented analysis and design that centers on understanding
how the system is actually used is :-
Correct Answer
Use-case-driven design
Your Answer
Object oriented system

Multiple Choice Single Answer


Question
Which funciton is used to append first n characters of a string at the end of
another?
Correct Answer
strncat
Your Answer
strncat

Multiple Choice Single Answer


Question
UML uses :
Correct Answer
OCL [ object Constraint Language ]
Your Answer
XML [ Extended mark up language ]

True/False
Question
Only one comment can be given in a C program
Correct Answer
False
Your Answer
False

Multiple Choice Single Answer


Question
It is an idendical function to strcmpi function :-
Correct Answer
stricmp
Your Answer
stricmp

Select The Blank


Question
________ means type of return value of a function.
Correct Answer
prototype
Your Answer
returntype

True/False
Question
strstr() finds number of occurences of a give string in another string.
Correct Answer
False
Your Answer
False

Match The Following


Question
Correct Answer
Your Answer
putch()
displays a single character
displays a single character
getche()
echoes a typed character
echoes a typed character, but an enter key should be hitted.
getch()
does not echo a typed character
echoes a typed character
getchar()
echoes a typed character, but an enter key should be hitted.
accepts a string

Multiple Choice Single Answer


Question
Individual element in the array can be referred with :-
Correct Answer
Subscript
Your Answer
Pointer

Select The Blank


Question
________ is logical OR operator
Correct Answer

Your Answer

Select The Blank


Question
In call by reference of passing array elements, the function argument is always
________
Correct Answer
Pointer
Your Answer
Pointer

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("%f",i * (c+2));}
Correct Answer
floating point error , 65
Your Answer
65 , 67.000000

True/False
Question
The use case may begin with no precondition or with some preconditions.
Correct Answer
True
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

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
Posted by MindGrill at 5:44 AM 0 comments Links to this post
Labels: C Programming
C Programming - 2

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
!

Multiple Choice Single Answer


Question
If array is initialised while declaring :-
Correct Answer
Mentioning dimension is not complusory
Your Answer
Mentioning dimension is complusory

Multiple Choice Single Answer


Question
Which function is used to write the output to an array of characters?
Correct Answer
sprintf
Your Answer
printf

Multiple Choice Multiple Answer


Question
Arguments can generally be passed to functions in the following two ways :-
Correct Answer
sending the values of the arguments , sending the addresses of the arguments
Your Answer
sending the values of the arguments , sending the addresses of the arguments

True/False
Question
Just like array of int / float, there can be array of pointers.
Correct Answer
True
Your Answer
True

True/False
Question
The set of statements belongining to a function are enclosed within a pair of
braces.
Correct Answer
True
Your Answer
True

Select The Blank


Question
________ is an input statement in C
Correct Answer
scanf
Your Answer
scanf

Match The Following


Question
Correct Answer
Your Answer
Test Model
Stipulates test strategy, test plans, test specifications, test results and test
recovary reports.
Stipulates test strategy, test plans, test specifications, test results and test
recovary reports.
Analysis Object Model
Presents information how object model will be executed.
Converts design object model to implementation model based on reusable component
technology.
Use case Model
Defines actors inside and outside of use case and their behaviour.
Implements use case data
Implementation Model
Converts design object model to implementation model based on reusable component
technology.
Presents information how object model will be executed.

Multiple Choice Multiple Answer


Question
Which of the following are not control instructions in C?
Correct Answer
Input/ Output , Arithmetic
Your Answer
Repition or Loop , Case , Arithmetic

True/False
Question
The default prototype of any C function is 'int'.
Correct 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
Posted by MindGrill at 5:43 AM 0 comments Links to this post
Labels: C Programming
C Programming - 1

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
call by value , call by reference
Your Answer
call by value , call by reference

True/False
Question
When array is declared with rows and columns it is called as 2-D i.e. two
dimensional array
Correct Answer
True
Your Answer
True

Multiple Choice Multiple Answer


Question
What will be the output of the following main(){ char c='d';float f=1;
printf("%c", c); printf("%d", c * f);}
Correct Answer
d , 0
Your Answer
d , 100
True/False
Question
strupr() function is used to convert a string into upper case.
Correct Answer
True
Your Answer
True

Select The Blank


Question
________ instruction ensures that the instructions are executed in the same order
in which they appear in the program.
Correct Answer
Sequence Control
Your Answer
Sequence Control

Multiple Choice Multiple Answer


Question
The command line arguments are :-
Correct Answer
argc , argv
Your Answer
argc , argv , arg1

True/False
Question
scanf is used to accept the input from the user.
Correct Answer
True
Your Answer
True

Multiple Choice Single Answer


Question
The break statement is used to exit from:-
Correct Answer
A for loop
Your Answer
A for loop

Multiple Choice Multiple Answer


Question
Which of the following fuctions require number of characters as one of the
parameters?
Correct Answer
strncmp , strnset , strncpy
Your Answer
strncmp , strnset , strncpy

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+
Multiple Choice Single Answer
Question
In which type, the values are passed to a function?
Correct Answer
call by value
Your Answer
call by value

Multiple Choice Single Answer


Question
Integer can have maximum value
Correct Answer
32767
Your Answer
32767

Multiple Choice Single Answer


Question
Which type of I/O functions are used to receive input from keyboard?
Correct Answer
Console
Your Answer
Console

Multiple Choice Multiple Answer


Question
What will be the output? main(){ char name[10]="String",n[10];
puts(strcpy(n,name)); printf("%d",strcmp(n,name));}
Correct Answer
String , 0
Your Answer
String , 1

Select The Blank


Question
There are as many as ________ odd operators in C which can affect the evaluation
of an expession in subtle and unexpected ways
Correct Answer
45
Your Answer
45

Multiple Choice Single 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
Arithmatic operations can be performed on characters where their ________ value is
used.
Correct Answer
ASCII
Your Answer
ASCII

Select The Blank


Question
________ function appends first n characters of a string at the end of another
Correct Answer
strncat
Your Answer
strncat

Multiple Choice Single Answer


Question
The collaboration diagram shows interaction between objects and sequence of
activities denoted by :-
Correct Answer
Members
Your Answer
Members

Multiple Choice Single Answer


Question
Which of the following is correct application of a structure.
Correct Answer
interacting with the mouse
Your Answer
uninstalling a mouse
Multiple Choice Single Answer
Question
An expression contains relational operators, assignement operators, and arithmatic
operators. In the absence of parentheses, they will be evaluated in which of the
following order?
Correct Answer
Arithmetic, relational, assignment
Your Answer
Arithmetic, relational, assignment

Match The Following


Question
Correct Answer
Your Answer
contiguous memory
structure elements
structure elements
int *a;
an integer pointer
an integer pointer
char *ch;
a character pointer
a character pointer
%u
a format specifier of address of the value.
a format specifier of address of the value.

True/False
Question
There are basically 5 types of instructions in C
Correct Answer
False
Your Answer
True

Select The Blank


Question
________ enable us to specify the order in which the various instructions in a
program are to be executed by the computer.
Correct Answer
Control Instructions
Your Answer
Control Instructions

True/False
Question
All structure elements are stored in contiguous memory locations.
Correct Answer
True
Your Answer
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
array elements to the function
Correct Answer
True
Your Answer
True
Posted by MindGrill at 5:40 AM 0 comments Links to this post
Labels: C Programming