Fundamentals of



Download 9.46 Mb.
Page20/57
Date09.01.2017
Size9.46 Mb.
#8172
1   ...   16   17   18   19   20   21   22   23   ...   57

Q.46 A variable required to accept the parameter returned by a function must be assigned the function to in

(a)True (b)False
Q.47 The return datatype of the function and that of the variable accepting the returned value can be

different

(a)True (b)False
Q.48 A void function cannot return any parameter

(a)True (b)False


Q.49 The name of the function is case insensitive

(a)True (b)False


Q.50 The prototype declaration can be written without writing the identifiers of the arguments

(a)True (b)False
Q.51 To call a function we need to simply write the name of the function followed by the parameters to be passed in the brackets

(a)True (b)False
Q.52 The variable used to accept the returned value from the called function must be written on the left of the function call statement separated by an ampersand (&) sign

(a)True (b)False
Q.53 The prototype declaration of a function can be the same as the header line of the function calling itself again and again

(a)True (b)False
Q.54 A recursive function may or may not have a condition such that there is an exit from the function calling itself again

(a)True (b)False




Q.55 The actual and formal parameters are the same variables with statement names

(a)True (b)False
Q.56 The actual and formal parameters are

(a)same variables with different names



(b)different variable name with same memory location

(c)different memory location with different variable names

(d) different memory location with same or different names


Q.57 An inline function is one that

(a)calls itself

(b)replaces the function call with the function definition

(c)has no return type

(d)none of the above
Q.58 The advantage of an inline function is that the

(a)program size becomes smaller



(b)execution becomes faster

(c)function is written in the same line with the program

(d)none of the above
Q.59 A function can be defined inline by (a)prefixing the keyword “inline” in the function declaration header (b) suffixing the keyword “inline” in the function declaration header (c) prefixing the keyword “inline” in the function prototype

(d) suffixing the keyword inline” in the function prototype
Q.60 An inline function cannot have any return type

(a)True (b)False


Q.61 An inline function cannot have any return type

(a)True (b)False
Q.62 Array is a collection of mixed data types

(a)True (b)False


Q.63 We can have a single array containing


(a)all integers

(c)3 integers and 3 float numbers

(b)5 integers and 5 float numbers



(d)all of the above



Q.64 The starting index of an array is always


(a)0 (c)2

(b)1 (d)none





Q.65 The index of the last element of an array of n elements will be


(a)n+1 (c)n-1

(b)n


(d)none of the above



Q.66 The size of an array can be changed during the execution of the program


(a)True (b)False


Q.67 The size of an static and cannot be initialized during the execution of the program

(a)True (b)False


Q.68 The correct syntax of declaring an array is (a)[array_size]data_type array _name; (b)array_name data_type [array_size]; (c)data_type array_name [array_size]; (d)data_type [array_size] array_name;
Q.69 The memory space allocated to the array declared as:

int a[10];

will be_ bytes




(a)10

(c)30

(b)20

(d)40



Q.70 The memory space allocated to the array declared as:

float a[10];

will be_ bytes


(a)10

(c)30

(b)20

(d)40



Q.71 To access an element of an array the operator is used


(a),(comma) (c)&(ampersand)

(b);(semi-colon)



(d)[] (square brackets)



Q.72 The 10th element of an array a‟ can be accessed as


(a)a[10] (c)a[9]

(b)a[11] (d)a[8]





Q.73 The maximum number of dimensions an array can have is


(a)1 (c)3

(b)2


(d)None of the above



Q.74 In a two-dimensions an array can have is (a)The element with row number ‘i’ and column number ‘j’ (b) The element with row number ‘j’ and column number ‘i’

(c) The element with row number (i-1) and column number (j-1)

(d) The element with element with row number (j-1) and column number(i-1)
Q.75 An array of characters terminated with a null character is called as


(a)pointer

(c)structure

(b)string



(d)none of the above



Q.76 The ASCII value of the null character stored at the end of the string is


(a)65 (c)0

(b)97


(d)none of the above

1   ...   16   17   18   19   20   21   22   23   ...   57




The database is protected by copyright ©ininet.org 2024
send message

    Main page