CBSE - MCQ Question Banks (के. मा. शि. बो . -प्रश्नमाला )

PreviousNext

Q. 193001 put( ) is a member function of


A. istream.

B. ostream.

C. cin.

D. cout.

Right Answer is: B

SOLUTION

put() is an output function so it is present in the output stream.


Q. 193002 The function that waits for a character input from the keyboard is


A. putchar( ).

B. getchar( ).

C. puts( ).

D. gets( ).

Right Answer is: B

SOLUTION

getchar() is an input function which reads the character pressed by the user on the keyboard.


Q. 193003 Strings of characters to be read or write at console are held by


A. get( ).

B. put( ) & puts( ).

C. getline( ) & write.

D. putchar().

Right Answer is: B

SOLUTION

put() and puts() are output functions used to display the arguements passed to them.


Q. 193004 putchar( ) is


A. multicharacter function.

B. string function.

C. single character outputfunction.

D. function to display a string.

Right Answer is: C

SOLUTION

putchar() is just the opposite of getchar(). It displays a single character.


Q. 193005 Identify the incorrect statement


A. ch=getchar( ).

B. getchar(ch).

C. putchar(b).

D. puts(“eureka”);.

Right Answer is: B

SOLUTION

the prototype of getchar is int getchar(void) so it cannot receive any arguement.


Q. 193006 getline( ) can read


A. white spaces.

B. newline.

C. white spaces and newline.

D. white spaces or newline.

Right Answer is: C

SOLUTION

getline() is a function used to accept a string. So it can accept white spaces as well as newline.


Q. 193007 The function get( ) can read


A. tab.

B. newline.

C. spacebar.

D. All whitespaces.

Right Answer is: D

SOLUTION

get() is a replacement for cin object. cin cannot accept whitespaces among the strings. Therefore in this case get() is preferred.


Q. 193008 cin.getline(string,26) will allow user to input


A. a string of 27 characters.

B. a string of 26 characters.

C. null string.

D. ‘/0’ as the first character.

Right Answer is: B

SOLUTION

cin.getline() function's protype is getline(str,MAX,DELIM) which extracts charcters into an array str of length MAX.


Q. 193009 putchar( ) is a


A. character.

B. multi character function.

C. single character function.

D. fuction to dispaly a string.

Right Answer is: C

SOLUTION

putchar() is an output function having the prototype putchar(ch) which is used to display a single character.


Q. 193010 Unformatted stream function, get( ) is a


A. multicharacter function.

B. string function.

C. alphabetical characters function.

D. single character function.

Right Answer is: D

SOLUTION

get() function has the prototype get(ch) which extracts one character into ch.


Q. 193011 Unformatted console functions are


A. gets( ) & puts( ).

B. putchar(  ).

C. getchar( ).

D. gets(), puts(), getchar(), putchar().

Right Answer is: D

SOLUTION

All of these are unformatted console functions beacause we don't have control over the number of characters that would get extracted into or from the string.


Q. 193012 istream and ostream are defined under


A. < string.h>.

B. < math.h>.

C. < conio.h>.

D. < iostream.h>.

Right Answer is: D

SOLUTION

istream stands for input stream while ostream stands for output stream. Both of them combined together form the iostream which contains all input output functions.


Q. 193013 The function getline is invoked with


A. ostream.

B. cin istream from keyboard.

C. cin in one line.

D. cout stream.

Right Answer is: B

SOLUTION

Function getline() gets invoked when a line of text is invoked in cin object.


Q. 193014 The function that returns true (nonzero), if it is an uppercase or a lowercase alphabet, is


A. isalpha().

B. islower().

C. isupper().

D. isupper&lower().

Right Answer is: A

SOLUTION

It returns false, if anything other than the alphabet is passed to this function.


Q. 193015 The function that returns true (nonzero), if it is a digit from 0 to 9, is


A. isdigit().

B. is0to9().

C. isadigit().

D. isnotalpha().

Right Answer is: A

SOLUTION

It returns false, if anything other than the digit is passed to this function.


Q. 193016 The function, that merges the string s2 onto the end of the character array s1, is


A. strcat(s1,s2).

B. strcat(s2,s1).

C. strconcate(s2,s1).

D. strcpy(s1,s2).

Right Answer is: A

SOLUTION

Here, array s1 must have enough reserved elements to hold both the strings.


Q. 193017 The function, that compares the string s1 with s2 on an alphabetic, element-by-element basis, is


A. strcpy(s1,s2).

B. strcat(s2,s1).

C. strcmp(s1,s2).

D. strcomp(s2,s1).

Right Answer is: C

SOLUTION

If s1 alphabetises before s2, strcmp() returns a negative value. If s1 and s2 are exacty the same, it returns zero. If s1 alphabetises after s2, strcmp() returns a positive value.


Q. 193018 The header file, to which the function clrscr() belongs to, is


A. < stdio.h>.

B. < conio.h>.

C. < iostream.h>.

D. < iomanip.h>.

Right Answer is: B

SOLUTION

is a console input output header file.


Q. 193019 The header file, to which the function gets () belongs to, is


A. < stdio.h>.

B. < conio.h>.

C. < iostream.h>.

D. < iomanip.h>.

Right Answer is: A

SOLUTION

is standard input output header file. It defines types and macros needed for standard I/O package.


Q. 193020 The functions like rename (), putc(), putchar() are defined in


A. < conio.h>.

B. < stdio.h>.

C. < math.h>.

D. < string.h>.

Right Answer is: B

SOLUTION

It defines types and macros needed for standard I/O package.


Q. 193021 The header file to which, the function read(), and write() belongs to, is


A. < fstream.h>.

B. < stdio.h>.

C. < file.h>.

D. < conio.h>.

Right Answer is: A

SOLUTION

The header file fstream provides an interface to read and write data from files as input/output streams.


Q. 193022 The header file in which, the built-in function random() is defined, is


A. < istream.h>.

B. < ostream.h>.

C. < fstream.h>.

D. < stdlib.h>.

Right Answer is: D

SOLUTION

It declares several commonly used routines, like conversion routines, search/sort routines etc.


Q. 193023 The functions strcat(), strcmp(), strcpy() are defined in


A. < strings.h>.

B. < string.h>.

C. < stream.h>.

D. < stdio.h>.

Right Answer is: B

SOLUTION

It declares several string manipulations and memory manipulation routines.


Q. 193024 In C++, ## is used to


A. perform token replacement.

B. perform preprocessor operations.

C. include two header files at the same time.

D. include a library function.

Right Answer is: A

SOLUTION

# is used for preprocessor directives and ## is used to perform token replacement and merging, during the preprocessor scanning phase.


Q. 193025 Manipulators used in C++ are


A. setw, setiosflags, setfill, setprecision.

B. cout, cin.

C. ‘n’.

D. setw, endl and scope resolution operator.

Right Answer is: A

SOLUTION

setw, setiosflags, setfill, setprecision, endl are manipulators. Manipulators are used to change formatting parameters on streams, and to insert or extract certain special characters.


Q. 193026 Every function in C++ has its code


A. within square brackets.

B. within angular bracket.

C. within curly braces.

D. no bracket used etc.

Right Answer is: C

SOLUTION

Every function in C++ has its code within curly braces. {}


Q. 193027 The functions like , isdigit() and islower() are present in


A. < string.h>.

B. < stdio.h>.

C. < math.h>.

D. < ctype.h>.

Right Answer is: D

SOLUTION

This header file provides interfaces, for developing multi-threaded applications.


Q. 193028 The function that checks, whether the given character is an uppercase letter or not, is


A. isupper().

B. toupper().

C. upper().

D. uppercase().

Right Answer is: A

SOLUTION

It returns true (non-zero), if it is an uppercase alphabet.


Q. 193029 A collection of subprograms used to develop other programs and software is called a


A. class.

B. library.

C. group of programs.

D. sub class.

Right Answer is: B

SOLUTION

Libraries are a helper code used in other independent programs.


Q. 193030 The function getchar( ) is contained in a header file known as


A. < stdio.h>.

B. < string.h>.

C. < math.h>.

D. < iomanip.h>.

Right Answer is: A

SOLUTION

The header file stdio.h defines the standard I/O predefined streams.


Q. 193031 The files that provide function prototypes, and definitions for library functions are known as


A. library codes.

B. headings.

C. header files.

D. library files.

Right Answer is: C

SOLUTION

Header files contain standard functions defined in C++ standard library, that a program may use.


Q. 193032 The header file containing functions like fabs1(), div(), exp(), atof() is


A. < stdio.h>.

B. < string.h>.

C. < math.h>.

D. < iomanip.h>.

Right Answer is: C

SOLUTION

The header file math.h declares prototypes for the math functions and math error handlers.


Q. 193033 The functions getline(), read(), get() , close() belong to the header file


A. < iostream.h>.

B. < string.h>.

C. < stdio.h>.

D. < iomanip.h>.

Right Answer is: A

SOLUTION

The header file iostream.h declares the basic C++ stream I/O routines.


Q. 193034 getline( ) is used with the stream


A. ostream.

B. istream.

C. input.

D. cin.

Right Answer is: B

SOLUTION

getline() is a function used when the user wants to read the text from the file one line at a time.


Q. 193035 Console function gets( ) and puts( ) are


A. single character functions.

B. string character functions.

C. characters.

D. all types of arrays fuction.

Right Answer is: B

SOLUTION

gets() is used to input a string while puts() is used to display a string.


Q. 193036 gets(name) does the following


A. get string variable called name.

B. only the last character of the string.

C. ‘/0’.

D. will get only the first charcter of the string.

Right Answer is: A

SOLUTION

gets( name) is a function that receives a string. So when gets(name) is invoked it would display the string present in name.


Q. 193037 getline( ) is an


A. input function and reads a line of text ending with a newline character.

B. output function.

C. function that reads digits only.

D. input function that reads a string.

Right Answer is: A

SOLUTION

The protype of getline is getline(str,MAX,DELIM) which extracts into array str, until mAX characters or the DELIM character. Extracts DELIM character.


Q. 193038 ctype is used by


A. stdlib.h.

B. iomanip.h.

C. string functions.

D. character functions.

Right Answer is: B

SOLUTION

iomanip.h declares the C++ streams I/O manipulators and contain macros for creating parametrised manipulators.


Q. 193039 The function that appends one string to another is


A. strcpy( ).

B. strcat( ).

C. tolower( ).

D. strcmp( ).

Right Answer is: B

SOLUTION

It allows one memory block to be appeneded to another.


Q. 193040 Header files provide


A. function prototypes.

B. stdio package.

C. only data types.

D. only constants.

Right Answer is: A

SOLUTION

The C and C++ standard library traditionally declare their standard functions in header files.


Q. 193041 atol( ), atoi( ) are functions used in


A. stdlib.h

B. iostream.h

C. iomanip.h

D. stdio.h

Right Answer is: A

SOLUTION

This header file declares sveral commaonly used routines like conversion routines,search/sort routines.


Q. 193042 To handle single character string use is made of


A. getchar( ).

B. getline( ).

C. write( ).

D. getchar(),getline() and write().

Right Answer is: A

SOLUTION

all of the three functions can be used to do processing on strings.They are used to input a string from the keyboard.


Q. 193043 For using getchar( ) the header file to be included is


A. unformatted string function.

B. < stdio.h>.

C. < iostream.h> .

D. console I/O function.

Right Answer is: B

SOLUTION

getchar() being a standard input function is present in the stdio.h header file.


Q. 193044 Two write functions can be combined as:


A. cout.write(string1,size1).write(string2,size2);

B. cout.write(string 1,string 2);

C. cout.write(string1,size1),write(string2,size2);

D. cout.write(string1,size1)+write(string2,size2);

Right Answer is: A

SOLUTION

The write function contains two arguments. The first argument represents the string and the second argument represent number of character to be displayed. Two write functions can be combined as follows- cout.write(string1,size1).write(string2,size2);  


Q. 193045 The minimum value displayed by the following statement will be: cout << random(10)+5;


A. 1

B. 0

C. 5

D. 9

Right Answer is: C

SOLUTION

The minimum value displayed by the following statement will be 5 (0+5=5).


Q. 193046 The prototypes for wide ranging and diverse functions are given in


A. standard library.

B. I/O file.

C. header files.

D. iostream.h.

Right Answer is: C

SOLUTION

The prototypes for wide ranging and diverse functions are given in header files. Header files are the component files of standard library that store various functions and their prototypes etc. 


Q. 193047 The maximum value returned by function random(34) is:


A. 34

B. 33

C. 32

D. 35

Right Answer is: B

SOLUTION

The random() function generates the random between 0 to range-1.  Therefore the statement random(34) will return the minimum value as 0 and maximum value as 33.


Q. 193048 Streams stdin, stdout, stdprn & stderr are predefined streams of


A. string.h.

B. stdlib.h.

C. stdio.h.

D. ctype.h.

Right Answer is: C

SOLUTION

These predefined streams of stdio.h automatically open when program starts. Stdin & stdout are for standard input and output device. Stderr is for standard error output device and stdprn for standard printer.


Q. 193049 Function used to clear the output screen is:


A. clear()

B. cls();

C. conio.h

D. clrscr();

Right Answer is: D

SOLUTION

The function clrscr() is used to clear the output screen. It is defined under header file conio.h.


Q. 193050 The header file ctype.h is used for:


A. Integer functions

B. String functions

C. Decimal functions

D. Character functions

Right Answer is: D

SOLUTION

The header file ctype.h is used to character functions. It contains various built in functions to perform operations on characters.


Q. 193051 The minimum value returned by the function random(10) will be:


A. 0

B. 1

C. 2

D. 9

Right Answer is: A

SOLUTION

The minimum value returned by the function random(10) will be 0. The random() generates the random numbers between 0 to range-1.


Q. 193052 Functions that appends a string to another is:


A. strcpy( );

B. strcat( );

C. tolower( );

D. strcmp( );

Right Answer is: B

SOLUTION

The function strcat(); is used to concatenate first string argument with the second string argument. The header file string.h is required to use this function.


Q. 193053 Output of the code cout << isalpha( c ); will be:


A. 1

B. 0

C. *

D. c

Right Answer is: B

SOLUTION

The output of the code cout << isalpha( c ); will be 0. The function isalpha() returns nonzero if its argument is an alphabet, otherwise it returns zero.


Q. 193054 Stdio.h file defines...


A. string manipulations.

B. error handlers.

C. type and macros needed for standard I/O package.

D. conversion routines.

Right Answer is: C

SOLUTION

The header file stdio.h file defines types and macros needed for the standard I/O package. This file also defines the standard I/O predefined streams.


Q. 193055 A function that will generate a random number within range 0 to num-1 is:


A. rand()

B. random(num)

C. srandom(num)

D. randomize()

Right Answer is: B

SOLUTION

The function random() is used to generate a random numbers according to the argument passed. The  function random(num) will generate random number between 0 to num-1. 


Q. 193056 Basic statements are stored together in...


A. separate programs.

B. a file.

C. standard c++ library.

D. sub programmes.

Right Answer is: C

SOLUTION

Basic elements of C++ are stored in C++ standard library. It provides definitions of various build in functions, classes and objects.


Q. 193057 Header file required to use function rand() is:


A. rand.h

B. random.h

C. stdio.h

D. stdlib.h

Right Answer is: D

SOLUTION

To generate random numbers in C++, the header file stdlib.h is used.  The header file stdlib.h contains rand(), srand(), random() and randomize() functions to generate header files.


Q. 193058 A function that check whether its argument is alphanumeric or not:


A. isalnum()

B. isalphanum()

C. isalpha()

D. isnum()

Right Answer is: A

SOLUTION

The function isalnum() is a character function and it checks whether its arguments are alphanumeric or not.


Q. 193059 Component files of C++ standard library are called:


A. Variables

B. Functions

C. Objects

D. Header files

Right Answer is: D

SOLUTION

Header files are component files of C++ standard library that stores various functions i.e., their prototypes, declarations for library functions, data types and constants used with them.


Q. 193060 Method used to compare two strings for equality is:


A. strlen()

B. strcpy();

C. strcat();

D. strcmp();

Right Answer is: D

SOLUTION

The method strcmp() compares two strings and returns less than zero value if the first string is less than the second string; returns zero value if both the strings are equal; and more than zero value if the first string is greater than the second string.   


Q. 193061  Conio.h defines functions for..?


A.  gotoxy( ), clrscr( )

B.  getchar( ), getche( ), getch( )

C.  Screen input / output

D.   All of the above

Right Answer is: C

SOLUTION

 Header file defines all the functions Mentioned in the question.  


Q. 193062 It contains definitions of various predefined functions:


A. Functions

B. Header files

C. Compiler

D. Objects

Right Answer is: B

SOLUTION

The header files defined in C++ contains definition of various predefined classes, function and object etc. These predefined functions simplifies the user's work during the code definition. 


Q. 193063 A function that checks whether its argument is a lowercase letter or not is:


A. tolower()

B. toupper()

C. isdigit()

D. islower()

Right Answer is: D

SOLUTION

The islower() is a character function which checks whether its argument is a lowercase letter or not.


Q. 193064 getchar( ) is a


A. multicharacter function.

B. single character function.

C. not a function.

D. user defined function.

Right Answer is: B

SOLUTION

getchar() is a standard library function that takes a single character as an input.


Q. 193065 cout and cin are defined in header file named


A. < conio.h>.

B. < iostream.h>.

C. < string.h>.

D. < process.h>.

Right Answer is: B

SOLUTION

cout and cin are used for displaying output and receiving input respectively and are include in the iostream.


Q. 193066 C++ library is a collection of classes and


A. data types

 

B. Statements 

 

C. Functions that are not used

 

D. functions 

 

Right Answer is: D

SOLUTION

The C++ Standard Library is a collection of classes and functions, that are written in the core language. The user need to specify the appropriate header files before using the function associated with it.


Q. 193067 Header files provide...


A. function prototypes.

B. stdio package.

C. only data types.

D. only constants.

Right Answer is: A

SOLUTION

Header contains definitions of various built in functions and objects. Therefore, to use any library function, the appropriate header file needs to be included in the program.  


Q. 193068 The header file for the functions getchar( ) and puts( ) is


A. < iostream.h>.

B. < conio.h/>.

C. < stdio.h> .

D. < string.h>.

Right Answer is: C

SOLUTION

gets() and puts() are functions that perform processing on input and output data.


Q. 193069 The function to handle string of characters from the keyboard is


A. getline( ).

B. puts( ).

C. write( ).

D. getchar( ).

Right Answer is: B

SOLUTION

the function puts() is used to display a string of charcters on the screen.


Q. 193070 eof( ), fail( ), good( ) functions are present in


A. stdlib.h

B. iomanip.h

C. math.h

D. iostream.h

Right Answer is: D

SOLUTION

iostream.h header file defines these functions.


Q. 193071 putchar( ), putc( ), puts( ) are functions present in


A. stdio.h

B. math.h

C. string.h

D. iomanip.h

Right Answer is: A

SOLUTION

This header file defines types and macros needed for the standard I/o package.


Q. 193072 C++ library stores functions of


A. variety of types.

B. same type.

C. hetregenous types.

D. strings only.

Right Answer is: B

SOLUTION

C++ library is a collection of functions, constants, classes, objects, and templates that extends the C++ language.


Q. 193073 The prototypes for wide ranging and diverse functions are given in


A. standard library.

B. I/O file.

C. header files.

D. iostream.h.

Right Answer is: C

SOLUTION

A header file contains forward declaration of classes, subroutines, variables, and other identifiers.


Q. 193074  In buffered character...


A.  the character does not wait for enter key to be pressed to go to memory.

B.  character goes to the function mentioned.

C.  character does not go to the function mentioned.

D.  the character goes in the memory when enter key is pressed.

Right Answer is: D

SOLUTION

 The character goes to the memory at pressing enter and can be erased if mistyped.


Q. 193075 The header file, to which the function clrscr() belongs to, is


A. < stdio.h>.

B. < conio.h>.

C. < iostream.h>.

D. < iomanip.h>.

Right Answer is: B

SOLUTION

is console input output header file.


Q. 193076 Which header file do the functions seekg and seekp belong to?
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

iostream.h.
seekg ( ) – belongs to the ifstream class

seekp ( ) – belongs to the ofstream class


Q. 193077 Does the function _fullpath belong to stdlib.h header file?
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

Yes, _fullpath converts the relative path name in path to an absolute path name that is stored in the array of characters pointed to by the buffer.


Q. 193078 Why are header files included in C++ programs?
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

Header files are included in C++ programs because these files allow the programmers to separate certain elements of program source code into reusable files. Header files commonly contain forward declarations of classes, subroutines, variables and other identifiers.


Q. 193079 Does the function fclose belong to string.h?
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

No, the function fclose belongs to stdio.h.


Q. 193080 What does stdio.h header file define?
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

The header file stdio.h defines the types and macros needed for the standard I/O package.


Q. 193081 Which header file do the functions floor and sin belong to?
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

math.h


Q. 193082 Name one character function.
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

int isalnum (int ch) This function returns nonzero value if its argument is either an alphabet or an integer. If the character is not an integer or alphabet, then it returns zero.


Q. 193083 Define the term ‘Library’.
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

A library is a collection of subprograms used to develop other programs and software.


Q. 193084 What are header files?
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

Header files are files containing class declarations, pre-processor directives.


Q. 193085 Explain the term ‘Standard Library’.
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

The standard C++ library is a collection of functions, constants, classes, objects and templates that extends the C++ language, providing basic functionality to perform several tasks like classes to interact with the operating system.


Q. 193086 Name any one string function.
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

char *strcat (char *str1, const char *str2) This function appends the string pointed to by str2 to the end of the string pointed to by str1. The terminating null character of str1 is overwritten.


Q. 193087 Which header file do the functions strcpy and strncat belong to?
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

string.h


Q. 193088 Name two functions to concatenate two strings.
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

The two functions used to concatenate two strings are:
1. strcat(): concatenates strings  
2. strncat(): appends characters from strings


Q. 193089 Differentiate between the function malloc() and calloc().
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

The differences between the two functions are as follows:
malloc() takes one argument, whereas calloc() takes two arguments. 
calloc() initializes all the bits in the allocated space to zero, whereas malloc() does not.


Q. 193090 What is the use of the function free ()? Name its parameters and the header file.
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

free() function is the function of the header file stdlib.h. The syntax of the free() function is as follows:

void free(void * ptr);

Parameters of free() function is a pointer, i.e., ptr.

free() function is used to free the space of a memory.


Q. 193091 What is a string? Also name some of the common operations of a string.
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

A string is a sequence of characters. Common operations of a string are:
1. Concatenation 
2. Comparison


Q. 193092 Name some important functions of the header file math.h.
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

Some important functions of the header file math.h are: sin(), tan(), pow(), tanh(), sinh(), sqrt(), floor(), log().


Q. 193093 Give the names of the functions in the header file stdio.h.
A. < stdio.h>.
B. < conio.h>.
C. < iostream.h>.
D. < iomanip.h>.

Right Answer is:

SOLUTION

The functions used in the header files are: scanf(), printf(), vprintf(), vscanf(), sprint(), fflush(), remove(), getc().


Q. 193094 Function scope refers to


A. it can be accessed by all files.

B. they can be accessed from any function.

C. they can be accessed only from the function that declares them.

D. all of the above.

Right Answer is: C

SOLUTION

Variables declared in function have function scope i.e they can be accessed only in the function that declares them.


Q. 193095 To make the function general


A. size of the array may be passed to it.

B. size is not passed to it.

C. none of these ways.

D. function cannot be made general.

Right Answer is: A

SOLUTION

If any function is made to be general then the size of array is pass to it.


Q. 193096 Function returning a reference can


A. can appear on the left hand side of an expression.

B. can appear on the right hand side of an expression.

C. depends on the condition being met.

D. none of the above.

Right Answer is: A

SOLUTION

function should appear on the left-hand side of an assignment statements if it returns a reference to a variable.

for example: min(x,y) = -5;

it assigns -5 to the lesser of the two, x and y.  


Q. 193097 using a function require


A. one step.

B. two steps.

C. three steps.

D. four steps.

Right Answer is: C

SOLUTION

For using a function, three steps are required:
(1) Function declaration.
(2) Function definition.
(3) Function call.  


Q. 193098 A function can return


A. no value.

B. integer and non integer value.

C. references.

D. all of the above.

Right Answer is: D

SOLUTION

A function-
.  Does not return any value if it is void type.
.  May return integer or non integer value.
.  May return references.    


Q. 193099 Arrays and pointers are...


A. not related to each other.

B. closely related to each other.

C. are equivalent to each other.

D. none of the above.

Right Answer is: B

SOLUTION

Pointers and arrays are not exactly the same entity, but they're very close. In fact, an array is for all intents and purposes a constant pointer.


Q. 193100 Array name is...


A. is a pointer to any element of the array.

B. Is a pointer to the first element.

C. not a pointer to the array.

D. not a pointer to the first element.

Right Answer is: B

SOLUTION

An array name is really a pointer to the first element of the array. For example, the following is legal.

int b[100]; // b is an array of 100 integers.
int* p; // p is a pointer to an integer.
p = b; // Assigns the address of first element of b to p.
p = &b[0]; // Exactly the same assignment as above.


PreviousNext