C interview preparation Quiz 2 Welcome to your Fresher Interview Preparation - C language Skills - 2 Name Email Phone Number 1. In below statement if exp1 is true then which exp will be executed ?Exp1 ? Exp2 : Exp3;BothExp3NoneExp22. strlen(s1);returns the length of string s1.returns the value of string s1.Nonereturns the address of string s1.3. The structure tag is ____________.!mandatoryNonecomplimentaryoptional4. What is the use of memcpy() ?Nonecopy one memory location to another location.copy one variable to another location.copy one value location to another location.5. Strings are actually one-dimensional array of characters terminated by a ________.Nonenull characteraddress charactervalue character6. Where are local variables declared ?In the definition of function parametersOutside of all functionInside a functionNone7. strcmp(s1,s2);returns 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 s1 s2returns 0 if s1 and s2 are the same ; less than 0 if s1None8. A union is a special data type avaiable in c that allow to store different data types in the _____memory location.NonedifferentVariablesame9. C allows a _______ to return an array.functionvariableNonedata10. We can define a union with many members, but only one member can contain a _____at any given time.valuefunctionNoneaddress11. In C, how to access the address.using @ operatorNoneusing % operatorusing & operator12. A loop becomes an infinite loop if a condition never becomes _______.falsetrueNonestatement13. strcat (s1,s2);Concatenates string s1 onto the end of string s2.Concatenates string s2 onto the end of string s1.wrong syntaxNone14. Structure is another user defined data type available in C that allows to combine data items of____________ kind.Nonevariablesamedifferent15. A loop statement allows us to execute a statement or group of statements _________ timesmultipledoublesingleNone16. An array is used to store a collection of _________.dataNonemetafunction17. To access any member of a union, we use the __________________.member access operator (.)decimal access operatorvariable access operatorNone18. Where are formal parameters declared ?Outside of all functionIn the definition of function parametersNonea. Inside a function19. Every C program has atleast one function which is __________Nonevoid()main()empty()20. Where are global variables declared ?In the definition of function parametersNoneInside a functionOutside of all function21. The C compiler automatically places the _______ at the end of the string when it initializes thearray.'\1''\2'None'\0'22. When the conditional expression is absent, it is assumed to be ______emptyNoneFalseTrue23. A variable of data type can store an _______________.!variable and semanticssrtuct and decimalint and floatNone24. We can terminate an infinite loop by pressing __________ keysCtrl + CCtrl + DCtrl +BNone25. strcpy ( s1,s2);copies string s2 into string s1Nonecopies string s1 into string s2wrong syntax26. To declare an array in C, a programmer specifies the ______________and _____________.function and datatype of the elements and number of elements.token and dataNone27. To access the members of a structure using a pointer to that structure, you must use the _____%None-->@28. A pointer is a variable whose value is the _______ of another variable.functionNoneaddressdata29. All arrays consist of __________ memory locationsvariablecontiguousdiscontiguousNone30. Bit fields allow the packing of ____ in a structure.dataaddressNonevalue31. strstr(s1,s2);Nonereturns a pointer to the first occurrence of string s1 in string s2.returns 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.32. A function declaration tells the compiler about a ___________, _____________and ______Nonevariable, value and expressionpattern, structure and voidfunction's name , return type and parameters.33. What is the use of the break statement ?break the loopNoneTerminates the loop or switch statement and transfers execution to the statement immediately following the loop or switch.break the statement34. When function declaration is required ?Nonewhen value is not specifiedDefine a function in one source file and you call that function in another file.when variable is not known35. Arrays a kind of data structure that can store a fixed-size sequential collection of elements ofthe ______type.Nonesamevariabledifferent36. A specific element in an array is accessed by an _______.functionindexnameNone37. In goto statement transfers control to the ____________ statementlabeleddynamicNoneparalled38. Unions provide an efficient way of using the ____ memory location for multiple purpose.samedifferentNonevariable39. What are the four arithmetic operators that can be used in pointers ?%,#,@,##++,--,+,-None!,@,#,%40. To define a structure, you must use the _________ statement.structsteadystructureNone41. What are the three places where variables can be declared in C programming language ?Noneno place existInside a function , Outside of all function and In the definition of function parameters.Below return statement42. strchr(s1,ch);returns a address to the first occurrence of character ch in string s1.Nonereturns a pointer to the first occurrence of character ch in string s1.returns a value to the first occurrence of character ch in string s1.43. We use the __________________ to access any memeber of a structure.Noneaddress access operator (&)variable access operatot (?)member access operator (.)44. A pointer that is assigned _________ is called a null pointerNULLaddressvalueNone45. The arraySize must be an _____________integer constantdouble constantNonefloat constant46. The union tag is ___________.optionalmandatoryNoneCompliment47. Structures are used to represent a __________recordvalueNoneaddress48. What are the two ways in which arguments can be passed to a function:value and variablecall by value and call by referencecode and functionsystem call and dynamic call49. The Simplest form of the multidimensional array is the ___________.single-dimensional arrayTriple-dimensional arrayNonetwo-dimensional array50. To find the address of a structure variable place the _____ operator before the structure name.%&*NonePlease fill in the comment box below. Time is Up!