Page 1

Unit V: “C” Language (QB)

1. C (Total Q. 238) Q 1. Which of the following is not a keyword in C language? A for B break C return D main Q 2. ` C ` is _______________________ language A Procedural B Assembly C Machine D Object-oriented Q 3. Which of the following is false statement for ` C ` ? A A keyword can be used as a variables name B variable names can contain digits C variable name do not contain blank space D capital letters can be used in variables names Q 4. F7 key is used as shortcut key in ` C ` programming for the purpose of ____ . A Tracing the 'C' Program B Compiling the 'C' Program C Editing the 'C' Program D None of above options is applicable Q 5. To save a file in TURBOC , we use….. A f2 B f3 C f3 D none of them Q 6. Who invented the C Language? A Dennis Ritchie B Brian Kernighan and Dennis Ritchie C Newton D Enstin Q 7. C is invented in the year______ A 1972 B 2008 C 2000 D 1976 Q 8. One thousandtenty four bytes equals_____________. A 1 Megabyte


Unit V: “C” Language (QB)

B 1 Gigabyte C 1 Kilobyte D None of the above Q 9. The library files that come with C are A Text editors for program development B The compiler & linker C Program examples D Files that contain functions which carry out various commonly used operations & calculations

Q 10. Which of the following is not a character classification in the ‘C’ language? A alphabets B characters C digits D graphical Q 11. ` C ` can be used on A Only MS-DOS operating system B Only unix operating system C Only WINDOWS operating system D All of the above Q 12. ` C ` can be used on __________platform(s). A MS-DOS operating system B Linux operating system C Windows operating system D All the above Q 13. C programs are converted to m/c language with the help of_______ A an editor B a compiler C An OS D none of these Q 14. Which escape character can be used to begin a new line in ` C ` ? A \a B \b C \m D \n Q 15. What is ASCII value range for ` a ` to ` z `


Unit V: “C” Language (QB)

A 65-90 B 97-122 C 47-57 D None Q 16.Every ` C ` program is contained in a source file having what suffix _______. A .h B .c C .cpp D .exe Q 17.There are only _______ keywords available in C A 43 B 39 C 32 D 78 Q 18.A compound statement is a group of statements included between a pair of A double quote B curly braces C parenthesis D a pair of /’s Q 19.What is length of variable in c? A 44 B 76 C 56 D 31

2. Datatypes Q 1. The maximum value an integer constant can haveis _________ A -32767 B 32767 C 1.74E+32 D -1.70E+38 Q 2. Which classes of the data types are supported by C? A primary data types B derived data types


Unit V: “C� Language (QB)

C User-defined data types D All the above Q 3. Which of the following is invalid variable name? A BASICSALARY B _basic C basic-hra D hELLO Q 4. Which of the following is not a valid identifier? A Num B $num C Amount D _amount1 Q 5. Which of the following is the correctly declaration variable? A 6num B emp_id C int D sum is Q 6. Identifiers are ___________. A Reserved word B keyword C user defined names D none of the above Q 7. What are hungarian notations? A Writing loops B Manipulating pointers C To write variable name D Flowchart notations Q 8. The conversion specification %c is used A to print a single character B to print more than one character C to print whole string D None of these Q 9. How does variable definition differ from variable declaration? A Definition allocates storage for a variable, but declaration only informs the compiler as to the variable's type. B Declaration allocates storage for a variable, but definition only


Unit V: “C� Language (QB) informs the compiler as to the variable's type. C Variables may be defined many times, but may be declared only once. D Variable definition must precede variable declaration.

Q 10. What is the difference between definition and declaration of variables A there is no difference B a definition occurs once, but declaration can occur many times C a declaration occurs once, but definition can occur many times D both can occur many time Q 11. Identify the invalid keyword in the following list. A integer B char C float D long int Q 12. Symbolic constants can be defined using a_________ A # define directive B const keyword C symbolic notation D None of these Q 13. What one of following variable names is not valid? A go_cart B go4it C 4season D run4 Q 14. Which of the following is not a user defined data type? A int B struct C union D None of the above *Q15. In "C" program ,constant is defined A before main B after main C anywhwre


Unit V: “C� Language (QB)

D none of above Q 16. Which of the following is not a integer constant in ` C ` ? A 'C' BC 45 D 1.2 Q 17. What number is equivalent to -4e3? A -4000 B -400 C -40 D 0.004 Q 18.Which of the following format strings is used to read an unsigned integer variable? A %d B %c C %u D None of above Q 19. The __________ field specification is used to read or write a short integer. A %c B %f C %lf D %d Q 20. Character constant should be enclosed in ______ . A Single inverted comma B Double inverted comma C Both D None Q 21. In C a variable name cannot contain ____________. A Blank spaces B Hyphen C Decimal point


Unit V: “C� Language (QB)

D All of the above Q 22. Size of data type ` double ` in ` C ` programming language is _____ . A 16 bits B 32 bits C 54 bits D 64 bits Q 23. Which of the following is the valid range of a long double data type ? A 3.4E-4932 to 1.1E+4932 B 3.4E-4932 to 3.4E+4932 C 1.1E-4932 to 1.1E+4932 D 1.7E-4932 to 1.7E+4932 Q 24. An integer constant in C must have _________ . A Atleast one digit B Atleast one decimal point C A comma along with digits D Digits seperated by commas Q 25. Minimum number of temperory variables needed to exchange the contents of two variables is A1 B2 C3 D0 Q 26. If ` a ` is a variable defined in a ` C ` program then &a denotes the ______ . A content of a B address of a C Both A and B D none of these Q 27. What is variable A Whoes value changes B Whoes value does not change C it is a constant D is a keyword Q 28. A character variable can at a time store _________ A One chracter


Unit V: “C� Language (QB)

B 8 chracters C 254 Charcter D None of the above Q 29. Assuming an unsigned integer is represented using 16 bits, the maximum value that an integer constant can have is A 256 B 32768 C 65536 D 128 Q 30. What is the maximum size of a float variable? A 2 bytes B 1 byte C 4 bytes D 8 bytes

Q 31. How many bits a byte containts ? A2 B8 C4 D6 Q 32. Which one of the following is NOT a valid identifier? A __ident B auto C bigNumber D g443354 Q 33. How will you write the value 3.14 to treat it as a long double number? A 3.14g B 3.14f C 3.14l D 3.14d Q 34. __________is a convention used for variable names in a programming language


Unit V: “C� Language (QB)

A IEEE standard B Hungarian notation C Pascal D All of the Above Q 35. What does ` a ` represents in the C language ? A a digit B a character C a word D an integer Q 36. The ` %u ` format specifier is used for printing _______. A an Unsigned integer B a Signed integer C a float D an address Q 37.In ` C ` language,if a variable is not defined , it contains some unpredictable value.This value is known as__________________. A extra value B non usable value C garbage value D useless value Q 38. Which of the following is not a integer constant in ` c ` A -320 B 45 C -3.18 D 1456 Q 39. Which of the following is not the identifier in C? A A3 BA C if D tax_rate Q 40. Which of the following Identifier is not valid? A _ option B amount C $sales D sales Q 41. The ____________ format string is used for


Unit V: “C� Language (QB)

displaying floating point number with an exponent. A %d B %f C %e D %g Q 42. Which one of the following printf() format specifiers indicates to print a double value in decimal notation, left aligned in a 30-character field, to four (4) digits of precision? A %-30.4e B %4.30e C %-4.30f D %-30.4f *Q 43. Global variables that are declared static are ____________. Which one of the following correctly completes the sentence above? A Deprecated by Standard C B Internal to the current translation unit C Read-only subsequent to initialization D Allocated on the heap

3. OPERATORS Q 1. Which one of the following C operators is right associative? A [] B, C= D -> Q 2. which one of the following is a logical operator? A= B && C <> D+ Q 3. Arithmetic operations are ______ type of operation. A Input B Output C Processing


Unit V: “C” Language (QB)

D Decision Making Q 4. Address operator ( & ) in ‘C’ is also called as a ....... A Refrence operator B Logical operator C Unary operator D Connective Q 5. 0 AND 0 gives A1 B0 C 10 D2 Q 6. Evaluate the following expression a = 7/22*(3.14 + 2) * 315 A 8.28 B 6.28 C 3.14 D0 Q 7. The 2’s complement of 1000 is A 111 B 101 C 1000 D1 Q 8. The expression, a=30*1000+2768 evaluates to ___________ A 32768 B -32768 C 113040 D0 Q 9. A _________ is a sequence of the operands & operators that reduces to a single value. A an expression B a category C a formula D a function Q 10. Which of the following is the a correct operator to compare the values store in any two variables? A := B= C equal


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

D == Q 11. The operator ` + ` in a+=4 means A a=a+4 B .a + 4 = a C a=4 D a=4+4 Q 12. X & X = ? A1 B0 C 2x Dx Q 13. The number of variables allowed on the left hand side of = are A2 B3 C1 D4 Q 14. The operator ` ^ ` is used for doing a _____ operation A bitwise AND B bitwise OR C bitwise exclusive OR D Logical exclusive OR Q 15. if int x = 2945, what is the value of the expression (x/100)%10? A5 B9 C 294 D 0.5 Q 16. _________ operator is not available in C. A+ BC* D\ Q 17. The equality operator is represented by A := B .EQ. C= D ==


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

Q 18. if int x = 2945, what is the value of the expression x %10? A 294 B5 C 294.5 *Q 19. Which operator has the lowest priority? A ++ B% C+ D *//./ Q 20. A Postfix expression consist of the _______ . A operands followed by the operators B operators followed by the operands C operands followed by the operands D operators followed by the operators *Q 21. The operators avialable in C are ________. A 45 B 35 C 25 D None Q 22. Which of the following C operator is odd one? A+ BC/ D ** Q 23. The bitwise AND operator is used for A Masking B Comparison C Division D Shifting bits Q 24. When applied to a variable, what does the unary "&" operator yield? A The variable's address B The variable's right value C The variable's binary form D The variable's value Q 25. The increment operation ` n+++ ` increments the value of the variable ` n ` by ________. A2


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

B -1 C3 D It is an invalid increment operation Q 26. The symbol != stands for A is greater than B is much greater than C is almost equal to D is not equal to Q 27. 0 NAND 1 gives A1 B0 C 10 D2 Q 28. Which of following is allowed in ` C ` Arithmetic instruction ? A {} B [] C () Q 29. The operator ` || ` is an example for-----------operator A Logical B Bitwise C Conditional D Relational Q 30. Which of the following is an example of a compounded assignment statement? A A =5 B A +=5 C A=B=C D A=B Q 31. What will be the BCD equivalent of the decimal number 12? A 0001 0010 B 0010 0001 C 0010 1000 D 1000 0100 Q 32. The ______ operator evaluates the operand on the right side of the operands & places its value in the variable on the left side of the opeartor.


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

A assignment B additive C multiplicative D postfix Q33.The ` sizeof ` operator tells us the size of a type or a primary expression in terms of number of _____ . A bytes B bits C nibbles D words Q 34. Base of hexadecimal number system is. A2 B8 C 10 D 16 Q 35. Identify the unary operator? A -B+ C/ D* Q 36. The ` % ` operator in C returns the A remainder of the division B quotient after the division C Percentage of a given value D All the above Q 37. Which operator can be used in a conditional statement? A relational B relational & conditional C logical & arithmetic D all operators in 'C' Q 38. If a is an integer variable , a=5/2 will return a value A 2.5 B3 C2 D0 Q 39. In "C "Programming language x -=y+1 means A x=x-y+1


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

B x=-x+y+1 C x=-x-y-1 D x=x-y-1

Q 40. Which one of the following C operators is right associative? A [] B, C= D -> Q 41. Which of the following is not a comparative operator? A >= B> C == D* Q 42. Which of the following is the a correct operator to compare the values store in any two variables? A := B= C equal D == Q 43. The operator >= is an example for ___ operator. A arithmetic B relational C logical D bitwise Q 44. Find the same expression for !(x>=y). A y>x B x>=y C x<Y< td> D x!=y Q 45. 0 AND 0 gives A1 B0 C 10


Unit V: “C” Language (QB)

D2 Q 46. Which of the following is used as “ is equal to” in C? A= B != C == D None of these Q 47. X%Y is equal to A (X-(X/Y)) B (X-(X/Y)*Y) C (Y-(X/Y)) D (Y-(X/Y)*Y) Q 48. The correct meaning of the expression ` a+=4 ` is _____ . A a=a+4 B a+4=a C a=4 D a=4+4 Q 49. The size of a structure can be determined by a. size of variable name b. size of (struct tag) A only a B only b C both a and b D none of these Q 50. if I want to check whether value of a & b are equal then which sign I have to use? A= B == C != D None of these Q 51. p++ executes faster than p=p+1 because A p uses registers B p++ is a single operation C ++ is faster than + D None of these Q 52.What willl be the result of expression ` x=16>>2 ` ? A4 B8 C3 D0


Unit V: “C” Language (QB)

Q 53. Which is used to find memory allocation of variable ________ . A sizeof B a++ C # define D # variable constant Q 54. A _________ is a sequence of the operands & operators that reduces to a single value. A an expression B a category C a formula D a function Q 55. Which operator has the lowest priority? A ++ B% C+ D* Q 56. Hierarchy decides which operator A is most important B is used first C is fastest D operates on largest numbers Q 57.which of the following is a ternary operator? A ?: B* C sizeof D/ Q58.which of the following operators in ‘C’ does not associate from the right? A, B= C += D ++ Q59.The number of the relational operators in the C language is A Four B Six C Three


Unit V: “C” Language (QB)

D One Q 60. Which of the following is not a logical operator? A& B && C || D!

4. IF … ELSE Q 1. A two way selection is implemented in the program, by using __________ statement. A case B else..if C switch D if..else Q 2. Which of the following is not a iterative construct? A a for loop B a do-while loop C an if-else statement D a while loop Q 3. If multiple statements are to be executed using the ` If ` statement then they must be placed within _________. A else statement. B a pair of braces. C pair of paranthesis D None of the above. Q 4. There are different ways to implement a multiway selection in ` C ` . They are A Nested if …..else B switch ….case C both a & b D non of the above Q 5. Which of the following statements, is used in decision making? A if B if-else C switch D All of the above


Unit V: “C” Language (QB)

Q 6. Which combinations of writing ` if..else ` and ` switch ` statements inside a program is possible? A writing switch in if else B writing if else in switch C writing one switch in another D all of above

5. SWITCH … CASE Q 1. The keyword _________is followed by an integer or character constant. A switch B case C for D void Q 2. A switch statement is used to A switch between functions B switch from one variable to another C to choose from multiple possibilities D to use switching variables Q 3. A __________ statement is very useful while writing the menu driven programs. A while B break C switch D if

6. LOOPs Q 1. A ` do-while ` loop is useful when the statements within the loop must be executed: A Only once B At least once C More than once D None of the above Q 2. Sentinel value is used to ________ . A Start a loop B Terminate a loop C Input value D Output value


Unit V: “C” Language (QB)

Q 3. Which part of a loop executes only once? A loop statement B loop expression C loop condition D initialization Q 4. Which of the ` C ` loops check the condition before a loop is executed? A while B for C both a & b D d0 ---while Q 5. How many loops are present in C? A One B Two C Three D None of these Q 6. If a ` while ` loop condition is checked for the seventh time, then the loop has already executed for _________times. A0 B5 C6 D7 Q 7. __________ must be done before the first execution of the loop body. A Condition Check B Initialization of the loop counter C Increment of the loop counter D Both A & B Q 8. In do-while loop, loop condition is checked at the __________ . A Beginning of loop B End of loop C End of program D Start of program Q 9. Which of the ` c ` loops is a pretest loop A Do… while B For C While


Unit V: “C” Language (QB)

D Both for and while Q 10. The body of a ` WHILE ` Loop has A one statement only B atleast two statements C one or more statements D None of above Q 11. How many times a ` do while ` loop is guaranteed to loop? A1 B0 C infinitely D many

7. BREAK … CONTINUE Q 1. Which statement can stop a loop? A continue B break C initialization D if Q 2. The ` continue ` statement cannot be used with A for B switch C do D while Q 3. ` continue ` statement is used A to go to the next iteration in a loop B come out of a loop C exit and return to the main function D restarts iterations from beginning of loop Q 4. Which of the following is used for making the next


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

iteration of the loop to be started? A break B case C continue D All the Above Q 5. Which amongst the following keywords is not at all required while writing a basic ` switch - case ` construct? A default B case C break D continue Q 6. The _____statement allows the programmer to take the control to the beginning of the loop, bypassing the statement inside the loop which has not yet been executed. A while B continue C go to D if

8. FUNCTIONS Q 1. Any ` C ` program contains at least _____Function. A main() B Two C Three D Zero Q 2. The various methods of debugging a program to locate & correct logical errors include : A Manual execution B Printing the intermediate result C Using a debugger D All of the above Q 3. malloc() function used in dynamic memory allocation is available in which header file? A stdio.h B stdlib.h


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

C conio.h D mem.h Q 4. . ... function is used to flush the data on output screen A getch B clrscr C main D None of these Q 5. scanf ("%15le",&dy) In this statement the maximum field width of the data item will be______________. A 15 characters B 3 characters C No limit D None of above Q 6. Which of the following statement return the control back to main when used in functions? A break B continue C return D exit Q 7. If ` C ` program contains only one function it must be____________. A if statement B while loop C for loop D main function Q 8. The printf() function returns which value when an error occures? A positive value B zero C Negative value D None of these\ Q 9. Function in C language is defined as A Name given to group of statements B Name given to group of different data types C Name given to goup of structures D None of the above. Q 10. Identify the wrong statement A putchar(65) B putchar('x')


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

C putchar("x") D putchar('\n') Q 11. _________ is used for output formatting . A print f B scan f C getch D return Q 12. For a function, a local variable is declared _________ . A inside the function B outside the function C both A and B D in the main program Q 13. Function can return multiple values using _______ A function call B return statement C arguments D array of pointers Q 14. The value which is passed to function is called ____________________. A argend B Parameter C value D none of these

Q 15. ________ is a repetitive process in which a function calls itself. A loop B function C both a & b D recursion Q 16. The getch() function in ` C ` is ___________ A user defined function B library function C both of above D none of above Q 17. When we pass an array of a structure to a function


Unit V: “C” Language (QB)

it is passed by the____________ mechanism. A Call by value B Call by reference C Call by name D None Q 18. What is a meaning of ` void () ` ? A it returns value B it does not return any value C it returns two values D it returns only one value Q 19. In the declaration statment void main() the word ‘void’ means the function---------A does not return any value B return a value C returns 2 or more values D none of these Q 20. The default parameter passing mechanism is A Call by value B Call by reference C Call by value result D none of these *Q 21. All macro substitutions in a program are done _______ . A before compilation of a program B after compilation of a program C during execution D none of above Q 22. Which of the following are the parameter passing methods 1.pass by value. 2. pass by reference 3. pass by address? A all B 1&2 C 2&3 D None of the above Q 23. The ___ function can be used to test for an end of file condition. A getc


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

B fopen C ferror D feof Q 24. The number of arguments in printf() are ______ . A2 B any number C4 D3 Q 25. The ______ function reads the data from keyboard A displayf B scanf C printf D read Q 26. Which is more appropriate for reading in a multiword string? A gets() B printf C scanf D puts() Q 27. Which one of the following statements about the function is true? A The function call is found in the called function. B the function declaration requires that the parameters be named. C The function definition is done with function declaration D The function definition contains statements that perform the function's task

Q 28. The mechanism by which a function can call itself is called


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

A reversal B recall C reaction D recursion Q 29. The ______ function reads the data from keyboard A displayf B scanf C printf D read Q 30. In the function call statement fun(a,b) , what are the two variables a &b are called________ A real paramaeters B formal parameters C actual parameters D imaginera parameters Q 31. When you pass an array as an argument to a function what actually gets passed? A address of array B value of the elements of array C address of first element of array D number of elements of array Q 32. Functions return _______ value by default. A void B char C integer D float Q 33. Recursion is a repetitive process in which a function________ A calls other function


Unit V: “C” Language (QB)

B calls itself C do not call itself D do not call other function Q 34. A _________ is a self contained block of statements that performs a coherent task of some kind. A function B compiler C statement D body of program Q 35. When the main function is called, it is called with the arguments…… A argc B argv C None of these D both a & b Q 36. . ... ... is standard output function A printf B scanf C getch D clrscr Q 37. The _______ function is used to display the output on the screen. A scanf B printf C getchar D clrscr Q 38. Which of the following statement is not true related to a subprogram?


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

A Subprogram helps you organize your total program (main program + subprograms) by grouping specific tasks in a well defined location.

B

Subprogram can save you repeating similar program structures at several places in your code C Subprogram can be executed independently. D Subprograms shorten and simplify manual programming.

Q 39. Find the function not present in # includefile. A printf() B sqrt() C scanf() D None

9. INPUT/OUTPUT Q 1. scanf ("%15le",&dy) In this statement the maximum field width of the data item will be______________. A 15 characters B 3 characters C No limit D None of above Q 2. Which device is commanly used as the standard pointing device in a Graphical user enviornment ? A Keyboard B Mouse C Joystick D Track ball Q 3. Which device is used as the standard Input device in a Textual User Interface? A Keyboard B Mouse C Joystick D Track ball Q 4. What will be the output of the following code ? main() { printf("Hello") }


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

A Hello B Syntax error C Hello D none Q 5. Which of the following is an output device? A Monitor B Keyboard C Touch-screen D Mouse

10. STRING Q 1. string ends with A '\0' B '/0' C '%0' D none of them Q 2. Which of the following header file is required for usuage of strcpy() function? A string.h B strings.h C files.h D strcpy() Q 3. Which of the following statements determines if the contents of string1 are the same as the contents of string2? A if (string1==string2) B if(strcmp(string1,string2)==0) C if(strcmp(string,string2)) D if(strcmp(string,string2)<0) Q 4. A string is treated as an____ A Array of integers B Array of floats C Array of characters D Both specify array size Q 5. which string manipulation function is used for determine length of string? A strcpy B strcat C strlen D strcmp


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

Q 6. A String is enclosed within ________. A [ and ] B < and > C " and " D ' and '

11. BCD/OCTAL Q 1. What will be the decimal equivalent of the binary number 10000 A 32 B 16 C8 D 24 Q 2. Base of octal number system is. A2 B8 C 10 D 16 Q 3. The binary number system uses base of A2 B8 C 10 D 16 Q 4. What will be the BCD equivalent of the decimal number 12? A 0001 0010 B 0010 0001 C 0010 1000 D 1000 0100

12. ARRAY Q 1. A ______ is a collection of different data types. A array B record type C structure D type definition Q 2. What is the name given to a derived C type in


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

which values are stored in continous memory locations? A Array B Pointers C Functions D Structure Q 3. An efficient means of printing a two-dimensional array is by using _______. A a 'do...while' loop B a 'for' loop C two nested 'for' loops D a 'while' loop Q 4. Array can be initialized, provided they are A automatic B external C static D both B & C Q 5. A _______has to take different processing action when a multidimensional array has been used. A Editor B compiler C parameter D None of these Q 6. Array subscripts in C always start at A -1 B1 C0 D None of these Q 7. What is the name given to a derived C type in which values are stored in continous memory locations? A Array B Pointers C Functions D Structure Q 8. A _______ is an ordered collection of related data items. A an element


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

B an array C a variable D a string Q 9. The maximum number of elements in array definition int x[10] is ___________. A9 B 10 C 11 D undefined Q 10. The student names can be stored using a _______ array, whereas a listing of marks obtained bye him can be stored using a _______ array. A string, numeric B numeric, string C character, Numeric D indexed, string Q 11. What will happen if you assign a value to an element of an array whose subscript exceeds the size of array? A element will be set to zero. B Nothing C Other data may be overwritten D Error message from compiler will occur Q 12. In an array declaration ` int arr[12] ` the word arr represents the _________. A Variable B string C array variable D none of these. Q 13. Select the correct option out of the following statements (marks is a one-dimensional integer


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

array) A *marks is same as marks[0] B *(marks + 1) is same as marks[1] C Both statements A and B are correct D None of the above statement is correct Q 14. Arrays are ______________. A homogeneous data structures B heterogeneous data structures C both of these D none of these Q 15. The number of elements that can be stored in an array is known by the __________. A index value B index value C array name D size of the array Q 16. a[i] can be written as A i[a] B a+I C i+a D all are correct Q 17. Structure is a collection of ________elements A Same B Different C Same or Different D Same & Different Q 18. A set of similar data types is called as____ A structure B function


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

C pointer D array Q 19. What is the index number of the last element of an array with 29 elements? A 29 B 28 C0 D Programmer-defined Q 20. Which element of the array does the expression num[4] references, where ` num ` is a name of array? A Forth B Third C Fifth D First Q 21. __________ is a group of related data items that share a common name. A Array B Structure C Union D All of the above

13. SEARCHING & SORTING Q 1. A _______ is the process of arranging the elements of an array in order. A searching B sorting C selection D None Q 2. The process finding data from list is called as A Sorting B Searching


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

C Parsing D Listing Q 3. The process through which data are arranged in ascending or descending order is known as_______ A arranging B sorting C listing D searching Q 4. A bubble sort compares the _______ elements, as it carries out the sorting process. A contrasting elements B first and last C even numbered D adjacent Q 5. How many passes are required for sorting using bubble sort for n numbers. A n-1 B n-2 Cn D None of the above Q 6. The process finding data from list is called as A Sorting B Searching C Parsing D Listing

14. PREPROCESSOR DIRECTIVE Q 1. Which of the following is not preprocessor directory? A #if B #elseif C #undef D #pragma Q 2. All preprocessor directives are proceed ________ A Before compilation of the program B After compilation


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

C During execution D None of the above Q 3. Which of the following is not a valid preprocessor directive in ` C ` ? A #if B #for C #undef D #pragma Q 4. The include command tells the preprocessor that we need information from selected libraries known as __________ . A header files B library files C c files D i/p o/p file Q 5. The word ` #define ` is used for the _____ . A macro definition B header file declaration C file inclusion D commenting Q 6. Which of the following is not a pre-processor directive in ` C ` language? A #define B #include C #ifndef D #pointer Q 7. What is used to interpret the preprocessor directives? A A Compiler B An Interpretor C A Pre processor D None of the above

15. FILE HANDLING Q 1. The ___ function can be used to test for an end of file condition. A getc B fopen


Unit V: â&#x20AC;&#x153;Câ&#x20AC;? Language (QB)

C ferror D feof Q 2. Which of the following C functions is used to set file pointer? A fwrite B fseek C fread D putc Q 3. Which of the following C functions is used to output data to a binary file? A fwrite B output C write D writef


Unit V: “C” Language (QB)


Unit V: “C” Language (QB)


Unit V: “C” Language (QB)


Unit V: “C” Language (QB)

Unit V  

1. C (Total Q. 238) Unit V: “C” Language (QB)

Advertisement