Wecome to all SCDLians

Hello Guys, i am requesting to all audience of this blog to like any thing that should be available for other students so please co-operate me and if you have any test papers as latest as that could be published with your reference. Please send with your name at the e-mail skdwivedi2009@gmail.com

Thank You !!
Showing posts with label C Programming. Show all posts
Showing posts with label C Programming. Show all posts

Monday, October 11, 2010

C Programming








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
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
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
Select The Blank
Question When the values are passed to a function as an argument, it is called as ________
Correct Answer call by value
Your Answer call by value


Multiple Choice Multiple Answer
Question Which of the following are not control instructions in C?
Correct Answer Input/ Output , Arithmetic
Your Answer Input/ Output , Arithmetic


True/False
Question In TSD based client server architecture, the user interface is loosely coupled with the data.
Correct Answer False
Your Answer False


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 , 101.000000
Your Answer 0 , 1.000000 , 101.000000


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


Select The Blank
Question When the addresses of variables are passed to a function as an argument, it is called as ________
Correct Answer call by reference
Your Answer call by reference


Select The Blank
Question There are basically ________ types of instrucitons in C.
Correct Answer 4
Your Answer 2


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 Single Answer
Question How many times 'return' statement can be written?
Correct Answer any
Your Answer once


Select The Blank
Question ________ function finds first occurrence of a given character in a string.
Correct Answer strchr
Your Answer strchr


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. Presents information how object model will be executed.
Use case Model Defines actors inside and outside of use case and their behaviour. Defines actors inside and outside of use case and their behaviour.
Implementation Model Converts design object model to implementation model based on reusable component technology. Implements use case data


Select The Blank
Question The address of the zeroth element is also called as ________
Correct Answer Base address
Your Answer Base address


Select The Blank
Question ________ is a person or device that uses the system.
Correct Answer User
Your Answer Entity


Multiple Choice Multiple Answer
Question What will be the output? main( ) { int a[10],i=0; for( ;i<=10;i++) a[i]=i+1; printf("%d",i); printf("%d",a[i-=2]); } Correct Answer 11 , 10 Your Answer 11 , garbage value Select The Blank Question ________ could be the alternate for if when it is related to integer / character constant expression only. Correct Answer switch Your Answer switch 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 Sets first n characters of a string to a given character. %s Format specification for a string Format specification for a string Select The Blank Question Array elements should be accessed using ________ if the elements are to be accessed in a fixed order. Correct Answer Pointers Your Answer Subscripts Multiple Choice Single Answer Question When array elements are passed to a function with their values, it is called as:- Correct Answer Call by value Your Answer Call by value True/False Question switch requires an integer expression. Correct Answer True Your Answer True Multiple Choice Multiple Answer Question Opening a file establishes a link between :- Correct Answer the program , the operating system Your Answer the program , the operating system 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 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 analysis Multiple Choice Single Answer Question In declaration char name[20]; it can hold Correct Answer 20 characters Your Answer 20 characters True/False Question One structure can be nested within another structure. Correct Answer True Your Answer True Multiple Choice Single Answer Question Any C function by default returns which value? Correct Answer int Your Answer int Multiple Choice Single Answer Question A function definition is enclosed within :- Correct Answer { } Your Answer ( ) True/False Question Standard I/O functions are nothing but stream I/O functions. Correct Answer True Your Answer True 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 Multiple Answer Question Point out the errors if any struct student{ int roll; int course, char duration; } main(){ struct student s1; int *p; p=&s; p.roll=101; } Correct Answer Incorrect p.roll=101 , no error but warning for suspicious pointer conversion Your Answer Incorrect p.roll=101 , address of structure cannot be assigned to an integer pointer 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 Select The Blank Question ________ should be avoided in programming. Correct Answer goto Your Answer goto Multiple Choice Single Answer Question Which is the ASCII value of End of file? Correct Answer 26 Your Answer 26 Multiple Choice Single Answer Question if an integer a = 2 and float b =6, the expression a + b evaluates to Correct Answer 8.000000 Your Answer 8.000000 Select The Blank Question ________ is escape sequence for new line. Correct Answer \n Your Answer \n Multiple Choice Single Answer Question Which of the following is a unformatted console I/O function to display a string? Correct Answer puts Your Answer putchar Multiple Choice Single Answer Question The language used for modeling and documenting system is :- Correct Answer UML Your Answer UML Multiple Choice Multiple Answer Question Which of the following statements are valid for C language? Correct Answer one man language , developed in 1972 Your Answer developed in 1972 , Only Low level language Multiple Choice Single Answer Question The simple logic for system specifications is provided by a languages named :- Correct Answer OCL [ Object Constraint Language ] Your Answer OOPL [ Object oriented Programming Language ] True/False Question Logical operators cannot be used with 'do' loop. Correct Answer False Your Answer False Multiple Choice Single Answer Question An array is a collection of :- Correct Answer The same data type placed next to each other in memory Your Answer The same data type placed next to each other in memory Multiple Choice Multiple Answer Question Which of the following operators have 2nd priority in operations? Correct Answer + , - Your Answer + , - Select The Blank Question After goto, ________ has to be mentioned to pass the control. Correct Answer label name Your Answer label name True/False Question The sequence diagram shows flow of behaviour and collaboration of objects. Correct Answer False Your Answer True 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 Multiple Answer Question What will be the output? main(){ int a=25, *b, **c; b=&a;c=&b; printf("%d",*c); printf("%u %u",b,c} Correct Answer garbage value , address of a , address of b Your Answer address of a , address of b

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 Multiple Answer
Question Which of the following fuctions require at least two strings as a parameter?
Correct Answer strcpy , strcat , strcmp
Your Answer strcpy , strcat , strcmp

Select The Blank
Question ________ function is identical to strcmpi()
Correct Answer stricmp
Your Answer strcmp

Multiple Choice Single Answer
Question C can be used on
Correct Answer All the above
Your Answer All the above

Multiple Choice Multiple Answer
Question Which of the following combinations in arithmetic operation give real result?
Correct Answer real and real , integer and real
Your Answer real and real , integer and real

Multiple Choice Multiple Answer
Question When an entire array is passed to a function, it could be passed by :-
Correct Answer Zeroth element of an array , Only name of the array
Your Answer Only name of the array , Pointer of the array

True/False
Question A function can return only one value at a time.
Correct Answer True
Your Answer True

True/False
Question argv is an array of pointers.
Correct Answer True
Your Answer True

True/False
Question Comments cannot be nested.
Correct Answer True
Your Answer True

Multiple Choice Single Answer
Question The simple logic for system specifications is provided by a languages named :-
Correct Answer OCL [ Object Constraint Language ]
Your Answer OOPL [ Object oriented Programming Language ]

Multiple Choice Single Answer
Question Which of the following is not a character constant
Correct Answer 'Thank You'
Your Answer 'Thank You'

Multiple Choice Single Answer
Question The method for industrial development of software based on use-case-driven design is
Correct Answer OOSE [ Object Oriented Software Engineering ]
Your Answer OOD [ Object Oriented Design ]

Select The Blank
Question ________ operator gives the size of the variable in bytes.
Correct Answer sizeof()
Your Answer sizeof()

Select The Blank
Question Array elements should be accessed using ________ if the elements are to be accessed in a fixed order.
Correct Answer Pointers
Your Answer Pointers

Multiple Choice Single Answer
Question How many types are there of arguments?
Correct Answer two
Your Answer two

Multiple Choice Single Answer
Question UML uses :
Correct Answer OCL [ object Constraint Language ]
Your Answer FGL [ Forth Generation Language ]

True/False
Question When array elements are passed to a function with call by reference, function has pointer arguments.
Correct Answer True
Your Answer True

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 Dynamic state

True/False
Question A constant is a quantity that doesn't change
Correct Answer True
Your Answer True

Multiple Choice Single Answer
Question In sequence diagram, the horizontal arrowhead line shows
Correct Answer Message 'from- to'
Your Answer Sequence of events

Select The Blank
Question Operation between ________ and a real always yields a Real result
Correct Answer a Real
Your Answer an integer

Multiple Choice Multiple Answer
Question Opening a file establishes a link between :-
Correct Answer the program , the operating system
Your Answer the operating system , buffer , the program

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 In exponential form range of real constant the part that appears before 'e' is called
Correct Answer mantissa
Your Answer exponent and mantissa

True/False
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
Correct Answer printf
Your Answer printf

Select The Blank
Question ________ function compares first n characters of two strings without regard to case.
Correct Answer strnicmp
Your Answer strcmp

Multiple Choice Single Answer
Question Though the names of formal and actual arguments are similar, they are treated as different variables because they are :-
Correct Answer in different functions
Your Answer in different functions

Match The Following
Question Correct Answer Your Answer

\r carriage return carriage return

\b backspace bakslash

\f form feed form feed

\t tab tab


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
Your Answer strupr

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

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 , Matrix

Match The Following
Question Correct Answer Your Answer

addition(int,int); return an integer value which passes 2 integer arguments Both arguments of float type which returns real value.

addition(); an integer function with no arguments an integer function with no arguments

float addition(int, float); a float function having integer and float type arguments a float function having integer and float type arguments

char addition(char,char); a char function having 2 arguments of char type a char function having 2 arguments of char type


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; printf("%c", c); printf("%f", c * f);}
Correct Answer d , 100.000000
Your Answer d , 100.000000

True/False
Question Logical operators cannot be used with 'do' loop.
Correct Answer False
Your Answer False

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

Select The Blank
Question ________ should be avoided in programming.
Correct Answer goto
Your Answer goto
Select The Blank
Question ________ operator is used to refer to the structure element, when structure pointer is declared
Correct Answer ->
Your Answer ->

Select The Blank
Question Usually structure type declaration appears at the ________ of the source code file, before any variable/functions are defined.
Correct Answer top
Your Answer top

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

Multiple Choice Single Answer
Question Which of the following is a unformatted console I/O function to display a 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


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

Select The Blank
Question The ________ diagram is used to understand or model the flow of system through classes or objects.
Correct Answer Activity
Your Answer Venn

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 An Array is a Primary Constant
Correct Answer False
Your Answer True

Multiple Choice Multiple Answer
Question Which operators are used to access the individual structure element.
Correct Answer . , ->
Your Answer . , ->

Multiple Choice Single Answer
Question The sequence diagram follows the following sequence :-
Correct Answer Use-case-transaction sequence
Your Answer Use-case-transaction sequence

Multiple Choice Single Answer
Question Which type of I/O functions are used to perform I/O operations on various ports?
Correct Answer Port
Your Answer Port

Multiple Choice Multiple Answer
Question What will be the output? main( ) { int a[10]={65,66,67},i=0; printf("%c",a[i]++); printf("%c",a[i]); }
Correct Answer A , B
Your Answer A , B

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
Your Answer True

Select The Blank
Question ________ is a relation operator used to compare for equal values
Correct Answer ==
Your Answer ==

Multiple Choice Single Answer
Question Which of the following statements is decision making instruction?
Correct Answer if
Your Answer if

Select The Blank
Question A structure can be used to ________ a floppy.
Correct Answer format
Your Answer read

Multiple Choice Single Answer
Question Two statements are written within if block without any braces, if condition is true it will :-
Correct Answer execute the first statement in the block and the 2nd will get executed irrespictive of the condition is true or false
Your Answer execute the first statement in the block and the 2nd will get executed irrespictive of the condition is true or false

True/False
Question In an array of structures all elements of the array are stored in adjacent memory locations.
Correct Answer True
Your Answer True

True/False
Question puts() can display only one string at a time.
Correct Answer True
Your Answer False

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

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


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]

Multiple Choice Multiple Answer
Question What will be the output? main(){ char name[10]="String"; int j=0; while(name[j]!='\0') { printf("%c",name[j]); j+=3; } printf("%c",name[--j]);}
Correct Answer S , i , g
Your Answer g

Multiple Choice Single Answer
Question An array 'num' of integer type for 3 rows and 5 columns should be declared as
Correct Answer int num[3][5]
Your Answer int num[3][5]

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

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 Multiple Answer
Question What will be the output? main(){ char name[10]="String",n[10]=""; int k; strncat(n,name,3); for(k=0;n[k]!='\0';k++) printf("\n%d",n[k]);}
Correct Answer 83 , 116 , 114
Your Answer 115

Multiple Choice Multiple Answer
Question Which of the following modes are used to write to a file?
Correct Answer w , w+ , a
Your Answer w , w+ , a

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 10

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 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 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
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












"To view papers click to above link or "+""