C interview preparation Quiz 2 Welcome to your Fresher Interview Preparation - C language Skills - 2 Name Email Phone Number 1. Arrays a kind of data structure that can store a fixed-size sequential collection of elements ofthe ______type.variablesameNonedifferent2. A variable of data type can store an _______________.!srtuct and decimalint and floatNonevariable and semantics3. A loop statement allows us to execute a statement or group of statements _________ timesmultiplesingledoubleNone4. A specific element in an array is accessed by an _______.Nonefunctionindexname5. We can define a union with many members, but only one member can contain a _____at any given time.valueNonefunctionaddress6. C allows a _______ to return an array.Nonevariabledatafunction7. Unions provide an efficient way of using the ____ memory location for multiple purpose.variableNonedifferentsame8. An array is used to store a collection of _________.functionmetaNonedata9. What is the use of the break statement ?break the statementNonebreak the loopTerminates the loop or switch statement and transfers execution to the statement immediately following the loop or switch.10. The arraySize must be an _____________double constantinteger constantfloat constantNone11. To find the address of a structure variable place the _____ operator before the structure name.&None*%12. A function declaration tells the compiler about a ___________, _____________and ______Nonepattern, structure and voidfunction's name , return type and parameters.variable, value and expression13. Every C program has atleast one function which is __________Nonemain()void()empty()14. The C compiler automatically places the _______ at the end of the string when it initializes thearray.None'\2''\0''\1'15. What are the four arithmetic operators that can be used in pointers ?++,--,+,-None!,@,#,%%,#,@,##16. Bit fields allow the packing of ____ in a structure.valueaddressdataNone17. strchr(s1,ch);Nonereturns a value to the first occurrence of character ch in string s1.returns a address to the first occurrence of character ch in string s1.returns a pointer to the first occurrence of character ch in string s1.18. What are the three places where variables can be declared in C programming language ?no place existBelow return statementInside a function , Outside of all function and In the definition of function parameters.None19. strcmp(s1,s2);Nonereturns 0 if s1 and s2 are the same ; less than 0 if s1 s2returns 0 if s1 and s2 are the same ; less than 0 if s1>s2 greater than 0 if s1 > s2returns 0 if s1 and s2 are the same ; less than 0 if s120. strcat (s1,s2);NoneConcatenates string s1 onto the end of string s2.wrong syntaxConcatenates string s2 onto the end of string s1.21. To declare an array in C, a programmer specifies the ______________and _____________.type of the elements and number of elements.function and dataNonetoken and data22. In below statement if exp1 is true then which exp will be executed ?Exp1 ? Exp2 : Exp3;Exp2NoneExp3Both23. A pointer is a variable whose value is the _______ of another variable.Nonefunctionaddressdata24. What is the use of memcpy() ?copy one value location to another location.Nonecopy one memory location to another location.copy one variable to another location.25. The structure tag is ____________.!Nonemandatorycomplimentaryoptional26. The union tag is ___________.mandatoryComplimentoptionalNone27. strlen(s1);returns the value of string s1.Nonereturns the address of string s1.returns the length of string s1.28. strstr(s1,s2);Nonereturns a pointer to the first occurrence of string s2 in string s1.returns a pointer to the first occurrence of string s2 in string s0.returns a pointer to the first occurrence of string s1 in string s2.29. Where are global variables declared ?In the definition of function parametersInside a functionOutside of all functionNone30. We use the __________________ to access any memeber of a structure.member access operator (.)Nonevariable access operatot (?)address access operator (&)31. When function declaration is required ?when variable is not knownNoneDefine a function in one source file and you call that function in another file.when value is not specified32. To access the members of a structure using a pointer to that structure, you must use the _____%None-->@33. What are the two ways in which arguments can be passed to a function:code and functionsystem call and dynamic callvalue and variablecall by value and call by reference34. We can terminate an infinite loop by pressing __________ keysCtrl + CCtrl +BNoneCtrl + D35. To access any member of a union, we use the __________________.decimal access operatorNonevariable access operatormember access operator (.)36. Structure is another user defined data type available in C that allows to combine data items of____________ kind.variabledifferentsameNone37. In goto statement transfers control to the ____________ statementNonedynamiclabeledparalled38. When the conditional expression is absent, it is assumed to be ______NoneTrueFalseempty39. In C, how to access the address.using & operatorNoneusing % operatorusing @ operator40. Structures are used to represent a __________addressrecordvalueNone41. A union is a special data type avaiable in c that allow to store different data types in the _____memory location.NoneVariablesamedifferent42. strcpy ( s1,s2);copies string s1 into string s2Nonewrong syntaxcopies string s2 into string s143. Strings are actually one-dimensional array of characters terminated by a ________.address charactervalue characternull characterNone44. A loop becomes an infinite loop if a condition never becomes _______.falsetrueNonestatement45. Where are formal parameters declared ?Outside of all functionIn the definition of function parametersa. Inside a functionNone46. Where are local variables declared ?In the definition of function parametersInside a functionOutside of all functionNone47. A pointer that is assigned _________ is called a null pointervalueaddressNULLNone48. All arrays consist of __________ memory locationsvariablediscontiguousNonecontiguous49. The Simplest form of the multidimensional array is the ___________.two-dimensional arraysingle-dimensional arrayNoneTriple-dimensional array50. To define a structure, you must use the _________ statement.structureNonestructsteadyPlease fill in the comment box below. Time is Up!