Você está na página 1de 133

1.

Which function is used to overcome the limitation of scanf of inability


to accept multi word string : Gets

2. After goto, Label name has to be mentioned to pass the control.

3. A string is 3D array : False

4. What will be the output ? main { : Float array is not


possible

5. C does not require a semicolon at the end of every statement : False

6. Which function is used to append n character from string 2 to string 1


: Strncat

7. A flowchart is a must for the better documentation of a complex


program : True

8. Name of the header file in which FILE in defined : Stdio.h

9. Int : -32768 to 32767, char : -128 to 127, float : -3.4e38 to 3.4e38,


double : -1.7e4932 to -1.7e4932

10.Argc is an integer : True

11.What will be the output : main() { printf (“only stupids use C?”);
display ();} : Infinite

12.Which of the given are types of control structures : iteration,


looping, input/ output statements

13.What will be the output : main () { int j; for (j=0; j<10; j++) { if (j==1)
break : Nothing

14.If no value is assigned to an array element, it is supposed to contain :


Garbage value

15.When a loop executes forever it is called as Infinite loop

16.A structure variable can be passed to a function True

17.An array is know as A collection of similar elements

18.In conditional operator, is condition is false : ?

19.Point out the error if any : diamond : ; is not allowed after switch

20.Strlen does not cont ‘\0’ in length : True


21.Which of the following are advantages of flowchart : Effective
analysis, efficient coding, efficient program maintenance

22.Changing the value of INITIAL inside a loop has : No effect

23.The alphabets, numbers and special symbols when properly combined


from constant, variable and Keywords

24.Which of the following are library functions : printf, scanf

25.In an array its elements are always stored in : Contiguous

26.Which function keys are related to tracing a program : F7

27.An integer array occupies Four

28.\0 indicates null value

29.The first element in the array is numbered with 0 True

30.Which of the following functions are used to append first n characters :


Strncat

31.“getstr” is more reliable function to accept string data : False

32.Which will the output : 7/22 : 100, 0

33.What will be the output : 0, 1.000000

34.Input/ output instructions are used to perform the function of supplying


input : True

35.A pointer refers to an address of the variable : True

36.Which of the following are valid statements regarding a structure : a


collection of dissimilar types of variables, the closing brace, the closing
brace

37.Which will be the output: num[10] : runtime error

38.Which fo the following are valid scanf statements : scanf(“%d”, &k)

39.A variable constant must have atleast one digit/ alphabat/ special
symbol.

40.“scanf” can not be used to accept : False

41.Assignment operator rank first : False


Select The Blank
Question ________ dimensional array has both rows and columns

Correct Answer 2

Your Answer 2

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 Class

Select The Blank


Question ________ function finds first occurrence of a given character in a string.

Correct Answer strchr

Your Answer strchr

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

True/False
Question Initialisation of the conditional variable is necessary for while loop.

Correct Answer True

Your Answer True

Multiple Choice Multiple Answer


Question Which of the following combinations in arithmetic operation give an integer
result?
Correct Answer integer and integer , integer and character

Your Answer integer and integer , integer and character

True/False
Question A structure variable can be passed to a function.

Correct Answer True


Your Answer True

Multiple Choice Single Answer


Question Which of the following is a format specifier to display the address of a
variable?
Correct Answer %u

Your Answer %u

Multiple Choice Single Answer


Question The variable name can have maximum length

Correct Answer 8 characters

Your Answer 8 characters

True/False
Question One structure can be nested within another structure.

Correct Answer True

Your Answer True

Multiple Choice Multiple Answer


Question What will be the output? main ( ) { int i = 0 ; switch ( i ) { case
0:printf("\nTemple is a non-issue" ) ; case 1:printf ("\nAandhi is never
stable") ; case 2:printf ("\nMandl will ruin India" ) ; break; case 3:printf
("\nWe want better politicians" ) ;} }
Correct Answer Temple is a non-issue , Andhi is never stable , Mandl will ruin India

Your Answer Temple is a non-issue , Andhi is never stable , Mandl will ruin India

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.

Multiple Choice Single Answer


Question Which type of function does not return any value?

Correct Answer void

Your Answer void

Select The Blank


Question ________model is based on actors and use cases.

Correct Answer Use case

Your Answer Use case

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 Name the header file in which FILE is defined :-

Correct Answer stdio.h

Your Answer stdio.h

Select The Blank


Question A structure can be used to ________ the size of the cursor.

Correct Answer change

Your Answer change

Multiple Choice Single Answer


Question Processes run by the users are modeled in the use case and situation in
which user plays this role is called :-
Correct Answer Scenario

Your Answer Scenario

Multiple Choice Single Answer


Question In this the condition is specified at the end of the loop :-

Correct Answer do

Your Answer do

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 behaviour


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

Select The Blank


Question A structure ________ copied to another structure of same type by simply
assigning using '=' operator.
Correct Answer can be

Your Answer can be

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

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


Question In C, comments is given with

Correct Answer --

Your Answer /* .. */

Select The Blank


Question To reverse a string, ________ function is used.

Correct Answer strrev

Your Answer strrev

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 S,i,g

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

getch() does not echo a typed does not echo a typed


character character
getchar() echoes a typed character, but echoes a typed character, but
an enter key should be hitted. an enter key should be hitted.

Multiple Choice Multiple Answer


Question Which of the following functions are used to find first occurrence of a
character or a string in another string?
Correct Answer strchr , strstr

Your Answer strchr , strstr

Multiple Choice Single Answer


Question A single dimensional array has :-

Correct Answer Only rows

Your Answer Only rows

Multiple Choice Multiple Answer


Question When an array has both rows and columns it is called as:-

Correct Answer Matrix , 2-D array

Your Answer 2-D array , Matrix , 3-D array

Select The Blank


Question The address of a structure ________ be passed to a function.

Correct Answer can

Your Answer can

Multiple Choice Multiple Answer


Question What will be the output? struct student{ int roll; int course, char duration; }
main(){ struct student s1; struct student *p; p=&s;
s.roll=101;s.course=501;s.duration='2'; p->roll=102; printf("%d%d",p-
>roll,s.roll); printf("%c",p->duration); }
Correct Answer 102102 , 2

Your Answer 102102 , 2

Multiple Choice Single Answer


Question C language has been introduced in the year

Correct Answer 1972

Your Answer 1972

True/False
Question "r" is a read mode to open a file which is a character not a string.

Correct Answer False

Your Answer True

Multiple Choice Multiple Answer


Question Which of the following statements are valid for any C program?

Correct Answer It must have main() function , Each statement must end with ';'

Your Answer It must have main() function , Each statement must end with ';'

True/False
Question In sense of time activity is longer and the action is relatively instantaneous.

Correct Answer True

Your Answer True

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

True/False
Question strdup() duplicates a string.

Correct Answer True

Your Answer True

True/False
Question printf is used to display the output at runtime.

Correct Answer True

Your Answer True

Match The Following


Question Correct Answer Your Answer

%s Format specification for a Format specification for a


string string
%c Format specification for a Format specification for a
character character
gets() To accept a string from To accept a string from
keyboard keyboard
puts() To display a string on the To display a string on the
screen screen

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

Multiple Choice Single Answer


Question Which function is used to copy one string into another?

Correct Answer strcpy

Your Answer strcpy

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

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 False

Multiple Choice Single Answer


Question If a is an integer, the expression, a=7/ 22 * ( 3.14 + 2) * 3 /5 ; evaluates to

Correct Answer 0

Your Answer 0

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 S,i,g

Select The Blank


Question ________models one or more roles that a user or a system interacting the
system can play.
Correct Answer Actor

Your Answer Actor

Multiple Choice Single Answer


Question Which type of function does not return any value?

Correct Answer void

Your Answer void

Select The Blank


Question ________ is an assignment operator.

Correct Answer =

Your Answer =

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 What will be the output? struct student{ int roll; int course, char duration; }
main(){ struct student s1; struct student *p; p=&s;
s.roll=101;s.course=501;s.duration='2'; p->roll=102; printf("%d%d",p-
>roll,s.roll); printf("%c",p->duration); }
Correct Answer 102102 , 2

Your Answer 102102 , 2

Multiple Choice Single Answer


Question Processes run by the users are modeled in the use case and situation in
which user plays this role is called :-
Correct Answer Scenario

Your Answer Scenario

Select The Blank


Question ________ function compares first n characters of two strings without
regard to case.
Correct Answer strnicmp

Your Answer strnicmp

Multiple Choice Single Answer


Question Which of the following is valid return statement?

Correct Answer return(25 + 22);

Your Answer return(25 + 22);

Multiple Choice Single Answer


Question This function is used to find number of characters in a string :-

Correct Answer strlen

Your Answer strlen

Select The Blank


Question The statements in C must appear in the ________ order in which those to
be executed.
Correct Answer same

Your Answer same


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 strset , strnset

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 Octal modeling of system

Multiple Choice Single Answer


Question Which of the following is a contol instruction in C.

Correct Answer Selection or Decision

Your Answer Selection or Decision

Multiple Choice Multiple Answer


Question Which of the following combinations in arithmetic operation give an integer
result?
Correct Answer integer and integer , integer and character

Your Answer integer and integer , integer and character

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

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


Question A character pointer of the FILE points to which character ?

Correct Answer first

Your Answer first


Match The Following
Question Correct Answer Your Answer

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

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

True/Falsethis the condition is specified at the beginning


Question strchr() find first occurrence of a given character in a string.

Correct Answer True

Your Answer True

Match The Following


Question Correct Answer Your Answer

^ No such operator No such operator

+ 2nd priority 2nd priority

* 1st priority Evaluates first

= 3rd priority 3rd priority

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


Question Which functions are High level, Text, Unformatted String I/O functions?

Correct Answer fgets , fputs

Your Answer fgets , fputs

Multiple Choice Single Answer


Question Which is the place of return statement in the called function?

Correct Answer any where

Your Answer at the end

Multiple Choice Multiple Answer


Question Which of the following statements are not valid for C language?

Correct Answer developed at Cambridge University , not a middle level language

Your Answer developed at Cambridge University , not a middle level language

Select The Blank


Question Circular difinition' is the another name for ________.

Correct Answer recursion.

Your Answer recursion.

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

Your Answer True

Multiple Choice Single Answer


Question Total keywords in 'C' are

Correct Answer 32

Your Answer 32

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

Multiple Choice Single Answer


Question This function is used to compare first n characters of two strings :-

Correct Answer strncmp

Your Answer strncmp

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

True/False
Question One structure can be nested within another structure.

Correct Answer True

Your Answer True

Select The Blank


Question In analytical phase ________ diagrams are achieved representing a
system.
Correct Answer Static

Your Answer Logical

True/False
Question Comments cannot be nested.

Correct Answer True

Your Answer True

Multiple Choice Multiple Answer


Question What will be the output? main( ) { int a[10]={101,102,103}, i;
for(i=0;i<3;i+=2) printf("%c",a[i]); }
Correct Answer e , g

Your Answer e,g

True/False
Question Input / Output instructions are used to perform the function of supplying
input data to a program and obtaining the output results from it.
Correct Answer True

Your Answer True

True/False
Question printf is used to display the output at runtime.

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

Your Answer d , 100.000000

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

Multiple Choice Single Answer


Question This funciton is used to convert a string to uppercase :-

Correct Answer strupr

Your Answer strupr

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

True/False
Question The value of the conditional variable should become false some time so
that the loop can be terminated.
Correct Answer True

Your Answer True


Select The Blank
Question Returning more than one value at a time from a function can be overcome
by using ________.
Correct Answer pointers

Your Answer pointers

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

Multiple Choice Single Answer


Question What will be the output? main(){ int a=25, *b; b=&a; printf("%d",*b);}

Correct Answer 25

Your Answer 25

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

True/False
Question strncpy() copier first n character of one string into anoter.

Correct Answer True

Your Answer True

Select The Blank


Question To reverse a string, ________ function is used.

Correct Answer strrev

Your Answer strrev

Match The Following


Question Correct Answer Your Answer
^ No such operator No such operator

+ 2nd priority 2nd priority

* 1st priority 1st priority

= 3rd priority 3rd priority

True/False
Question Infinite loop is the loop which stops when the condtions is false.

Correct Answer False

Your Answer False

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


Question Which of the following are basic data types in C?

Correct Answer int , float , char

Your Answer int , float , char

True/False
Question Comments cannot be nested.

Correct Answer True

Your Answer True

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 mantissa

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.

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 Processes run by the users are modeled in the use case and situation in
which user plays this role is called :-
Correct Answer Scenario

Your Answer Scenario

Multiple Choice Single Answer


Question The data passed from one object to another is called :-

Correct Answer Message

Your Answer Message

Select The Blank


Question In switch, ________ never have a constant to check.

Correct Answer default

Your Answer default

Multiple Choice Multiple Answer


Question What will be the output? main( ) { int a[10]={10,20,30},i=0; printf("%d",a[i]+
+); printf("%d",a[i]); }
Correct Answer 10 , 11

Your Answer 10 , 11

Multiple Choice Multiple Answer


Question Which of the following are valid prototypes of a function?

Correct Answer float , char

Your Answer integer , float , char

Multiple Choice Multiple Answer


Question Which of the following modes are used to read from a file?
Correct Answer r , r+

Your Answer a , r , r+

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 behaviour

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

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

Multiple Choice Multiple Answer


Question The three main areas where text and binary mode files are different :-

Correct Answer Handling of new lines , representation of end of file , storage of numbers.

Your Answer Handling of new lines , storage of numbers. , Handling of tabs

Multiple Choice Multiple Answer


Question Which functions are High level, Text, Unformatted String I/O functions?

Correct Answer fgets , fputs

Your Answer fgets , fputs

True/False
Question If the file is absent, fopen() returns NULL.

Correct Answer True

Your Answer False

Select The Blank


Question Decision and ________ instructions allow the computer to take a decision
as to which instruction is to be executed next.
Correct Answer Case

Your Answer Selection

Multiple Choice Single Answer


Question Which of the following is a format specifier to display the address of a
variable?
Correct Answer %u

Your Answer %u

Multiple Choice Single Answer


Question Use case steps are executed in :-

Correct Answer Logical order

Your Answer Serial order

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

True/False
Question An Integer is a Primary Constant

Correct Answer True

Your Answer True

Multiple Choice Single Answer


Question A character pointer of the FILE points to which character ?

Correct Answer first

Your Answer first

Select The Blank


Question After goto, ________ has to be mentioned to pass the control.

Correct Answer label name

Your Answer label name


Multiple Choice Single Answer
Question Which of the following is valid return statement?

Correct Answer return(25 + 22);

Your Answer return(25 + 22);

True/False
Question argv is an array of pointers.

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 True

Select The Blank


Question ________ is an input statement in C

Correct Answer scanf

Your Answer scanf

Multiple Choice Single Answer


Question A two dimensional array has :-

Correct Answer Both rows and columns

Your Answer Both rows and columns

True/False
Question strlen() doesn't count '\0' in a length.

Correct Answer True

Your Answer True

Select The Blank


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

Multiple Choice Single Answer


Question The variable name can have maximum length

Correct Answer 8 characters

Your Answer 8 characters

Multiple Choice Single Answer


Question Find out the false statement from the following

Correct Answer Each new C instruction has to be written on a separate line

Your Answer Each new C instruction has to be written on a separate line

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

Select The Blank


Question C allows ________ variable(s) on left hand side of =.

Correct Answer only one

Your Answer only one

Select The Blank


Question To declare a function choice() which returns a character value, ________
statement is written.
Correct Answer char choice( );

Your Answer char choice( );

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

Match The Following


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

True/False
Question On pointer variable can be substracted from another provided both
variables point to elements of the same array.
Correct Answer True

Your Answer False

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 , it will turn into infinite loop

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


Question Which pointer operator is used to display the address of a variable?

Correct Answer &

Your Answer &

True/False
Question strdup() duplicates a string.

Correct Answer True


Your Answer False

Multiple Choice Single Answer


Question Integer can have maximum value

Correct Answer 32767

Your Answer 32767

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 Precedence decides which operator

Correct Answer is used first

Your Answer is used first

Multiple Choice Single Answer


Question Which of the following is string terminator?

Correct Answer \0

Your Answer \0

Select The Blank


Question ________ function is used to convert a string to upper case

Correct Answer strupr

Your Answer strupr

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

Multiple Choice Single Answer


Question Point out the error if any main(){ int a=20, *j; j=&a; printf("%d", *a);}
Correct Answer In printf '*k' is incorrect.

Your Answer In printf '&a' is necessary.

Multiple Choice Single Answer


Question A character pointer of the FILE points to which character ?

Correct Answer first

Your Answer first

Multiple Choice Single Answer


Question If a is an integer variable, a = 5 / 2; will return a value

Correct Answer 2

Your Answer 2

Multiple Choice Multiple Answer


Question Point out the errors if any. main ( ) { int i =1; do{ printf("%d ",i ) ; i+++; }
while(i<=10) }
Correct Answer +++ no such operator , ;' is required at the end of while

Your Answer +++ no such operator , ;' is required at the end of while

Multiple Choice Multiple Answer


Question Which functions are High level, Text, Unformatted String I/O functions?

Correct Answer fgets , fputs

Your Answer fgets , fputs

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 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 ________ mode arithmetic statement is an arithmetic statement in which
all operands are either integer varaibles or integer constant.
Correct Answer Integer

Your Answer Mixed

True/False
Question Whenever the control returns from a function some value is definitely
returned except for void function..
Correct Answer True

Your Answer True

True/False
Question strlen() doesn't count '\0' in a length.

Correct Answer True

Your Answer True

Multiple Choice Single Answer


Question Which of the following is a valid statement to assign an address of integer
k to a pointer j ?
Correct Answer j = &k;

Your Answer j = &k;

Select The Blank


Question The control statement which allows us to make a decision from the number
of choices is called a ________.
Correct Answer switch

Your Answer switch

True/False
Question Primary and Secondary are the two types of constants in C.

Correct Answer True

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

getch() does not echo a typed does not echo a typed


character character
getchar() echoes a typed character, but echoes a typed character, but
an enter key should be hitted. an enter key should be hitted.

Multiple Choice Single Answer


Question In sequence diagram, the objects that participate in the behaviour are
shown by
Correct Answer Rectangle

Your Answer Rectangle

True/False
Question In case of array of pointers to strings, we can receive the strings from
keyboard using scanf()
Correct Answer False

Your Answer False

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

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

Select The Blank


Question After the case, ________ expression is not allowed.

Correct Answer float

Your Answer arithmetic

Select The Blank


Question ________ is a specific sequence of transactions in a dialogue between a
user & a system representing a particuler way to use the system.
Correct Answer Use case
Your Answer Use case

Select The Blank


Question ________ operator is used to refer to the structure element, when
structure pointer is declared
Correct Answer ->

Your Answer ->

True/False
Question Default statement is optional in switch.

Correct Answer True

Your Answer False

Multiple Choice Multiple Answer


Question Which agruments are required for fgets()?

Correct Answer address of the string , maximum length , file pointer

Your Answer address of the string , maximum length , file pointer

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

True/False
Question A structure variable can be passed to a function.

Correct Answer True

Your Answer True

Select The Blank


Question C allows ________ variable(s) on left hand side of =.
Correct Answer only one

Your Answer only two

Multiple Choice Single Answer


Question The variable name can have maximum length

Correct Answer 8 characters

Your Answer 8 characters

Select The Blank


Question ________ function compares first n characters of two strings without
regard to case.
Correct Answer strnicmp

Your Answer strnicmp

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

Correct Answer True

Your Answer True

True/False
Question Input / Output instructions are used to perform the function of supplying
input data to a program and obtaining the output results from it.
Correct Answer True

Your Answer True

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;

True/False
Question Through behavior modeling we understand relationships, nature of
interactions and response between various elements of the system. The
behavior model throws light on functionality, features and outputs within
the framework of conditions and constraints over a period of time.
Correct Answer True

Your Answer False


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 Class

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 S,i,r

Multiple Choice Multiple Answer


Question What will be the output? main ( ) { int i ; for(i=1;i<=5;i++){ printf("%d ",i ) ;
if(i==3) break; } }
Correct Answer 1 , 2 , 3

Your Answer 1,2,3

Multiple Choice Multiple Answer


Question The command line arguments are :-

Correct Answer argc , argv

Your Answer argc , argv

Select The Blank


Question In case 'call by value', the actual arguments of a function are always
________
Correct Answer address of the variables

Your Answer values of the variables

Match The Following


Question Correct Answer Your Answer

%c Format specification for a Format specification for a


character character
gets() To accept a string from To accept a string from
keyboard keyboard
puts() To display a string on the To display a string on the
screen screen
%s Format specification for a Format specification for a
string string
Select The Blank
Question The set of statements belonging to a function are enclosed within a pair of
________.
Correct Answer braces

Your Answer paranthesis

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

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 behaviour

Multiple Choice Multiple Answer


Question What will be the output? main ( ) { int i = 0 ; for(i=1;i<=5;i++){ switch ( i%3 )
{ case 0:printf("%d ",i ) ; break; case 1:printf ("%d",i) ; }} }
Correct Answer 1 , 3 , 4

Your Answer 3,4

Multiple Choice Single Answer


Question Which of the following statements is decision making instruction?

Correct Answer if

Your Answer if

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

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 array

Match The Following


Question Correct Answer Your Answer

continue continues the immediate loop continues the immediate loop

if decision control statement decision control statement

do loop structure loop structure

break terminates the immediate terminates the immediate loop


loop

Multiple Choice Single Answer


Question In this the condition is specified at the beginning of the loop :-

Correct Answer while

Your Answer while

Select The Blank


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

Your Answer Pointer

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

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 strset , strnset

True/False
Question The keywords should not be used as variables.

Correct Answer True


Your Answer True

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

Multiple Choice Single Answer


Question Maximum length of an Integer data type is

Correct Answer -32767 to 32767

Your Answer 32767

Multiple Choice Single Answer


Question The unified approach [ UA ] is used to build

Correct Answer Object Oriented system

Your Answer Object Oriented system

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 3-D array

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

Your Answer True

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

Correct Answer False

Your Answer False

Select The Blank


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

Your Answer returntype

True/False
Question All structure elements are stored in contiguous memory locations.

Correct Answer True

Your Answer True

Multiple Choice Multiple Answer


Question Point out the errors if any main( ) { int a[],i; for( ;i<=10;i++) a[i]=i+1;
printf("%d",i); printf("%d",a[100]); }
Correct Answer Size of the array is not defined , Logical error of non-initialisation of the
variable I
Your Answer Size of the array is not defined , Logical error of non-initialisation of the
variable I

True/False
Question In Low Level Disk I/O functions, buffer management has to be done
explicitly by the programmer.
Correct Answer True

Your Answer False

Select The Blank


Question In design phase ________ diagrams are refined to add more details with
attributes and methods for implementation.
Correct Answer Class

Your Answer Logical

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

Multiple Choice Single Answer


Question What will happen if you assign a value to an element of an array whose
subscript exceeds the size of the array?
Correct Answer Nothing, it's done all the time

Your Answer Error message from the compiler


Multiple Choice Single Answer
Question C language has been introduced in the year

Correct Answer 1972

Your Answer 1972

True/False
Question A pointer is a secondary constant.

Correct Answer True

Your Answer False

Select The Blank


Question ________ is a output statement in C

Correct Answer printf

Your Answer printf

Select The Blank


Question ________ operator in C is used to perform the exponentiation operation.

Correct Answer No

Your Answer ^

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 Case

Select The Blank


Question ________ function sets all characters of string to a given character.

Correct Answer strset

Your Answer strchr

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 statements are valid for any C program?

Correct Answer It must have main() function , Each statement must end with ';'

Your Answer It must have main() function , Each statement must end with ';' , Each
statement should be written on new line.

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 one man language , developed in 1972

Select The Blank


Question ________ is an input statement in C

Correct Answer scanf

Your Answer scanf

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

Multiple Choice Multiple Answer


Question Two dimensional array has :-

Correct Answer Rows , Columns

Your Answer Rows , Columns

True/False
Question Structure variable appears before the '.' while accessing the individual
element of a structure
Correct Answer True

Your Answer True

Match The Following


Question Correct Answer Your Answer
x*=10 = ( if x = 0 ) 0 0

x++ = ( if x = 0 ) 1 1

--x = ( if x = 0 ) -1 -1

x+=5 = ( if x = 0) 5 5

True/False
Question Infinite loop is the loop which stops when the condtions is false.

Correct Answer False

Your Answer False

True/False
Question If the file is absent, fopen() returns NULL.

Correct Answer True

Your Answer False

Multiple Choice Single Answer


Question What will be the output? main ( ) { int i = -4, j, num ; j = ( num < 0 ? 0 : num
* num ) ; printf ( "\n%d", j ) ; }
Correct Answer garbage value

Your Answer garbage value

Multiple Choice Single Answer


Question What happens with strcat function ?

Correct Answer appends a string at the end of another

Your Answer appends a string at the end of another

Select The Blank


Question ________ is a relation operator used to compare for unequal values

Correct Answer !=

Your Answer <>

Select The Blank


Question ________ dimensional array has both rows and columns

Correct Answer 2
Your Answer 3

Multiple Choice Single Answer


Question Which of the following is format specifier of a string?

Correct Answer %s

Your Answer %s

Select The Blank


Question The statements in C must appear in the ________ order in which those to
be executed.
Correct Answer same

Your Answer same

LIST OF ATTEMPTED QUESTIONS AND ANSWERS


True/False
Question Standard I/O functions cannot manage their own
buffer management.
Correct Answer False
Your Answer True

Select The Blank


Question ________ mode arithmetic statement is an arithmetic
statement in which some of the operands are integers
and some of the operands are real.
Correct Answer Mixed
Your Answer Real

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

Multiple Choice Single Answer


Question What will happen if you put too few elements in an
array when you initialise it?
Correct Answer Unused elements will be filled with 0's or garbage
Your Answer Unused elements will be filled with 0's or garbage

Select The Blank


Question In case 'call by value', the actual arguments of a
function are always ________
Correct Answer address of the variables
Your Answer values of the variables

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 mantissa
LIST OF ATTEMPTED QUESTIONS AND ANSWERS
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 S,i,g
Answer
Your Answer S,i,g

Select The Blank


Question ________models one or more roles that a user or a system interacting the
system can play.
Correct Actor
Answer
Your Answer Actor

Multiple Choice Single Answer


Question Which type of function does not return any value?

Correct void
Answer
Your Answer void

Select The Blank


Question ________ is an assignment operator.

Correct =
Answer
Your Answer =

Multiple Choice Single Answer


Question An array is a collection of :-

Correct The same data type placed next to each other in memory
Answer
Your Answer The same data type placed next to each other in memory

Multiple Choice Multiple Answer


Question What will be the output? struct student{ int roll; int course, char duration; }
main(){ struct student s1; struct student *p; p=&s;
s.roll=101;s.course=501;s.duration='2'; p->roll=102; printf("%d%d",p-
>roll,s.roll); printf("%c",p->duration); }
Correct 102102 , 2
Answer
Your Answer 102102 , 2

Multiple Choice Single Answer


Question Processes run by the users are modeled in the use case and situation in
which user plays this role is called :-
Correct Scenario
LIST OF ATTEMPTED QUESTIONS AND ANSWERS
True/False
Question strncpy() copier first n character of one string into anoter.

Correct True
Answer
Your Answer True

Select The Blank


Question To reverse a string, ________ function is used.

Correct strrev
Answer
Your Answer strrev

Match The Following


Question Correct Answer Your Answer

^ No such operator No such operator

+ 2nd priority 2nd priority

* 1st priority 1st priority

= 3rd priority 3rd priority

True/False
Question Infinite loop is the loop which stops when the condtions is false.

Correct False
Answer
Your Answer False

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 garbage value , address of a , address of b
Answer
Your Answer address of a , address of b

Multiple Choice Multiple Answer


Question Which of the following are basic data types in C?

Correct int , float , char


Answer
Your Answer int , float , char

True/False
Question Comments cannot be nested.
LIST OF ATTEMPTED QUESTIONS AND ANSWERS

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
LIST OF ATTEMPTED QUESTIONS AND ANSWERS

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
LIST OF ATTEMPTED QUESTIONS AND ANSWERS

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 Stipulates test strategy, test
plans, test specifications, plans, test specifications, test
test results and test recovary results and test recovary
reports. reports.
Analysis Object Model Presents information how Presents information how
object model will be object model will be
executed. executed.
Use case Model Defines actors inside and Defines actors inside and
outside of use case and their outside of use case and their
behaviour. behaviour.
Implementation Model Converts design object Implements use case data
model to implementation
model based on reusable
component technology.
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 Format specification for a
character character
gets() To accept a string from To accept a string from
keyboard keyboard
puts() To display a string on the Sets first n characters of a
screen string to a given character.
%s Format specification for a Format specification for a
string 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
LIST OF ATTEMPTED QUESTIONS AND ANSWERS
Multiple Choice Single Answer
Question Which function requires an enter key to be hit after accepting a
single character?
Correct getchar
Answer
Your Answer getch

True/False
Question If the file is absent, fopen() returns NULL.

Correct True
Answer
Your Answer True

Multiple Choice Multiple Answer


Question Which of the following operators have 2nd priority in operations?

Correct +,-
Answer
Your Answer =

Multiple Choice Single Answer


Question What is the another name of 'value at address' operator?

Correct indirection
Answer
Your Answer indirection

Multiple Choice Single Answer


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

True/False
Question printf is used to display the output at runtime.

Correct True
Answer
Your Answer True

Select The Blank


Question The link between the program and the operating systme is a
structure called ________
Correct FILE
Answer
Your Answer binary
LIST OF ATTEMPTED QUESTIONS AND ANSWERS
Multiple Choice Single Answer
Question The main advantage of using state chart diagram is :-

Correct it provides an understanding of process & algorithm used in the


Answer method.
Your Answer it provides an understanding of process & algorithm used in the
method.

True/False
Question strrchr() find first occurrence of a given character in a string.

Correct False
Answer
Your Answer True

Multiple Choice Multiple Answer


Question The three main areas where text and binary mode files are
different :-
Correct Handling of new lines , representation of end of file , storage of
Answer numbers.
Your Answer Handling of new lines , representation of end of file , storage of
numbers.

Multiple Choice Single Answer


Question This function is used to read the contents of a file :-

Correct fgetc
Answer
Your Answer fgetc

Multiple Choice Multiple Answer


Question Which of the following are control instructions in C?

Correct Sequence Control , Selection or Decision


Answer
Your Answer Selection or Decision

Multiple Choice Single Answer


Question Which pointer operator is used to display the value at address?

Correct *
Answer
Your Answer &

Multiple Choice Single Answer


Question In sequence diagram, the existance of objects in the behaviour are
shown by
Correct Dotted line
Answer
Your Answer Dotted line
LIST OF ATTEMPTED QUESTIONS AND ANSWERS
True/False
Question In sequence diagrams, the connection between objects is shown.

Correct False
Answer
Your Answer True

Multiple Choice Single Answer


Question C is a

Correct Middle Level Language


Answer
Your Answer None of the above

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 floating point error , 65
Answer
Your Answer 65

True/False
Question The keywords are also called as 'Reserved Keywords'

Correct True
Answer
Your Answer True

Multiple Choice Single Answer


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

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

Correct False
Answer
Your Answer False

Multiple Choice Multiple Answer


Question Which of the following are not control instructions in C?

Correct Input/ Output , Arithmetic


Answer
Your Answer Input/ Output , Arithmetic
LIST OF ATTEMPTED QUESTIONS AND ANSWERS
Match The Following
Question Correct Answer Your Answer
x > 0 ? 'T' : 'F' ( if x = 5 ) 84 84
x > 5 ? 100 : 0 ( if x = 5 ) 0 0
x == 5 ? 200 : 100 ( if x = 200 200
5)
x < 35 ?( x == 5?50:10):30 ( 50 50
if x = 5 )

Multiple Choice Single Answer


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

Multiple Choice Multiple Answer


Question Which of the following are control instructions in C?
Correct Answer Sequence Control , Selection or Decision
Your Answer Selection or Decision

Multiple Choice Single Answer


Question In logical OR :-
Correct Answer Either of the conditions has to be TRUE
Your Answer Either of the conditions has to be TRUE

Match The Following


Question Correct Answer Your Answer
Access Layer under OOA Objects whose role is to Objects whose role is to
communicate to data communicate to data storage.
storage.
Layered architecture under User interface tightly User interface tightly
TSD coupled with data coupled with data
Business Layer under OOA Objects that represent Objects that represent
business with data and business with data and
behaviour. behaviour.
UI layer under OOA Objects with which user Objects with which user
interacts. interacts.
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

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

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

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

at 4:00 AM 0 comments Links to this post

Labels: C Programming (Set II)

Wednesday, July 16, 2008

C Programming - 5

LIST OF ATTEMPTED QUESTIONS AND ANSWERS

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

at 6:13 AM 0 comments Links to this post

Labels: C Programming (Set II)

C Programming - 4

LIST OF ATTEMPTED QUESTIONS AND ANSWERS

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