

MCQOPTIONS
Saved Bookmarks
This section includes 1331 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
801. |
An FT-IR instrument record a signal in the |
A. | time domain |
B. | frequency domain |
C. | both (a) and (b) |
D. | none of these |
Answer» B. frequency domain | |
802. |
What is the similarity between a structure, union and enumeration? |
A. | All of them let you define new values |
B. | All of them let you define new data types |
C. | All of them let you define new pointers |
D. | All of them let you define new structures |
Answer» C. All of them let you define new pointers | |
803. |
How will you free the allocated memory ? |
A. | remove(var-name); |
B. | free(var-name); |
C. | delete(var-name); |
D. | dalloc(var-name); |
Answer» C. delete(var-name); | |
804. |
In C, if you pass an array as an argument to a function, what actually gets passed? |
A. | Value of elements in array |
B. | First element of the array |
C. | Base address of the array |
D. | Address of the last element of array |
Answer» D. Address of the last element of array | |
805. |
Which of the following statement obtains the remainder on dividing 5.5 by 1.3 ? |
A. | rem = (5.5 % 1.3) |
B. | rem = modf(5.5, 1.3) |
C. | rem = fmod(5.5, 1.3) |
D. | Error: we cant divide |
Answer» D. Error: we cant divide | |
806. |
The binary equivalent of 5.375 is |
A. | 101.101110111 |
B. | 101.011 |
C. | 101011 |
D. | None of above |
Answer» C. 101011 | |
807. |
What are the different types of real data type in C ? |
A. | float, double |
B. | short int, double, long int |
C. | float, double, long double |
D. | double, long int, float |
Answer» D. double, long int, float | |
808. |
In mathematics and computer programming, which is the correct order of mathematical operators ? |
A. | Addition, Subtraction, Multiplication, Division |
B. | Division, Multiplication, Addition, Subtraction |
C. | Multiplication, Addition, Division, Subtraction |
D. | Addition, Division, Modulus, Subtraction |
Answer» C. Multiplication, Addition, Division, Subtraction | |
809. |
Which standard library function will you use to find the last occurance of a character in a string in C? |
A. | strnchar() |
B. | strchar() |
C. | strrchar() |
D. | strrchr() |
Answer» E. | |
810. |
Input/output function prototypes and macros are defined in which header file? |
A. | conio.h |
B. | stdlib.h |
C. | stdio.h |
D. | dos.h |
Answer» D. dos.h | |
811. |
Which bitwise operator is suitable for checking whether a particular bit is on or off? |
A. | && operator |
B. | & operator |
C. | || operator |
D. | ! operator |
Answer» C. || operator | |
812. |
Which bitwise operator is suitable for turning on a particular bit in a number? |
A. | && operator |
B. | & operator |
C. | || operator |
D. | | operator |
Answer» E. | |
813. |
Which bitwise operator is suitable for turning off a particular bit in a number? |
A. | && operator |
B. | & operator |
C. | || operator |
D. | ! operator |
Answer» C. || operator | |
814. |
In which numbering system can the binary number 1011011111000101 be easily converted to? |
A. | Decimal system |
B. | Hexadecimal system |
C. | Octal system |
D. | No need to convert |
Answer» C. Octal system | |
815. |
In a file contains the line "I am a boy\r\n" then on reading this line into the array str using fgets(). What will str contain? |
A. | "I am a boy0" |
B. | "I am a boy0" |
C. | "I am a boy0" |
D. | "I am a boy" |
Answer» D. "I am a boy" | |
816. |
Which of the following function is more appropriate for reading in a multi-word string? |
A. | printf(); |
B. | scanf(); |
C. | gets(); |
D. | puts(); |
Answer» D. puts(); | |
817. |
Which of the following function is used to find the first occurrence of a given string in another string? |
A. | strchr() |
B. | strrchr() |
C. | strstr() |
D. | strnset() |
Answer» D. strnset() | |
818. |
The library function used to find the last occurrence of a character in a string is |
A. | strnstr() |
B. | laststr() |
C. | strrchr() |
D. | strstr() |
Answer» D. strstr() | |
819. |
If the two strings are identical, then strcmp() function returns |
A. | -1 |
B. | 1 |
C. | 0 |
D. | Yes |
Answer» D. Yes | |
820. |
Which of the following function sets first n characters of a string to a given character? |
A. | strinit() |
B. | strnset() |
C. | strset() |
D. | strcset() |
Answer» C. strset() | |
821. |
The operator used to get value at address stored in a pointer variable is |
A. | * |
B. | & |
C. | && |
D. | || |
Answer» B. & | |
822. |
A pointer is |
A. | A keyword used to create variables |
B. | A variable that stores address of an instruction |
C. | A variable that stores address of other variable |
D. | All of the above |
Answer» D. All of the above | |
823. |
If a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable? |
A. | . |
B. | & |
C. | * |
D. | -> |
Answer» E. | |
824. |
In which header file is the NULL macro defined? |
A. | stdio.h |
B. | stddef.h |
C. | stdio.h and stddef.h |
D. | math.h |
Answer» D. math.h | |
825. |
What is (void*)0? |
A. | Representation of NULL pointer |
B. | Representation of void pointer |
C. | Error |
D. | None of above |
Answer» B. Representation of void pointer | |
826. |
The keyword used to transfer control from a function back to the calling function is |
A. | switch |
B. | goto |
C. | go back |
D. | return |
Answer» E. | |
827. |
In which order do the following gets evaluated . Relational 2. Arithmetic 3. Logical 4. Assignment |
A. | 2134 |
B. | 1234 |
C. | 4321 |
D. | 3214 |
Answer» B. 1234 | |
828. |
When we mention the prototype of a function? |
A. | Defining |
B. | Declaring |
C. | Prototyping |
D. | Calling |
Answer» C. Prototyping | |
829. |
By default a real number is treated as a |
A. | float |
B. | double |
C. | long double |
D. | far double |
Answer» C. long double | |
830. |
How would you round off a value from 1.66 to 2.0? |
A. | ceil(1.66) |
B. | floor(1.66) |
C. | roundup(1.66) |
D. | roundto(1.66) |
Answer» B. floor(1.66) | |
831. |
Which of the following special symbol allowed in a variable name? |
A. | * (asterisk) |
B. | | (pipeline) |
C. | - (hyphen) |
D. | _ (underscore) |
Answer» E. | |
832. |
What are the types of linkages? |
A. | Internal and External |
B. | External, Internal and None |
C. | External and None |
D. | Internal |
Answer» C. External and None | |
833. |
Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ? |
A. | rem = 3.14 % 2.1; |
B. | rem = modf(3.14, 2.1); |
C. | rem = fmod(3.14, 2.1); |
D. | Remainder cannot be obtain in floating point division. |
Answer» D. Remainder cannot be obtain in floating point division. | |
834. |
Which one of the following keyword is used to inherit our subclass into a superclass? |
A. | extends |
B. | implements |
C. | inherit |
D. | include |
Answer» B. implements | |
835. |
A function call mechanism that passes arguments to a function by passing a copy of the values of the arguments is ............... |
A. | call by name |
B. | call by value |
C. | call by reference |
D. | call by value result |
Answer» C. call by reference | |
836. |
A character variable can never store more than ............... |
A. | 32 characters |
B. | 8 characters |
C. | 254 characters |
D. | 1 character |
Answer» E. | |
837. |
An integer constant in C must have ................... |
A. | At least one digit |
B. | At least one decimal point |
C. | A comma along with digits |
D. | Digits separated by commas |
Answer» B. At least one decimal point | |
838. |
While incrementing a pointer, its value gets increased by the length of the data type to which it points. This length is called |
A. | scale factor |
B. | length facto |
C. | pointer factor |
D. | increment factor |
Answer» E. | |
839. |
Which can be passed as an argument to a function? |
A. | constant |
B. | expression |
C. | another function |
D. | all of the above. |
Answer» B. expression | |
840. |
What will be the output of the following program? #include void main() { float x=5,y=2; int result; result=x % y; cout |
A. | 1 |
B. | 1.0 |
C. | Error message |
D. | 2.5 |
Answer» D. 2.5 | |
841. |
Which of the following statement is valid? |
A. | We can create new C++ operators. |
B. | We can change the precedence of the C++ operators. |
C. | We can change the associativity of the C++ operators. |
D. | We can not change operator templates. |
Answer» E. | |
842. |
Which of the following operator can be overloaded through friend function? |
A. | -> |
B. | = |
C. | ( ) |
D. | * |
Answer» E. | |
843. |
What will be the result of the expression 13 & 25? |
A. | 38 |
B. | 25 |
C. | 9 |
D. | 12 |
Answer» D. 12 | |
844. |
In the following code fragment int x, y = 2, z, a; x=(y*=2) + (z=a=y); printf (‘%d’,x); |
A. | prints 8 |
B. | prints 6 |
C. | prints 6 or 8 depending on the compiler |
D. | is syntactically wrong |
Answer» B. prints 6 | |
845. |
What is the output of the following code int n=0, m; for (m=1; m |
A. | 2 |
B. | 1 |
C. | 0 |
D. | 6 |
Answer» C. 0 | |
846. |
If a=8 and b=15 then the statement x= (a>b) ? a:b; |
A. | assigns a value 8 to x |
B. | gives an error message |
C. | assigns a value 15 to x |
D. | assigns a value 7 to x |
Answer» D. assigns a value 7 to x | |
847. |
Which of the following ways are legal to access a class data member using this pointer? |
A. | this.x |
B. | *this.x |
C. | *(this.x) |
D. | (*this).x |
Answer» E. | |
848. |
Overloading a postfix increment operator by means of a member function takes |
A. | no argument |
B. | one argument |
C. | two arguments |
D. | three arguments |
Answer» B. one argument | |
849. |
A copy constructor takes |
A. | no argument |
B. | one argument |
C. | two arguments |
D. | arbitrary no. of arguments |
Answer» C. two arguments | |
850. |
What would be the output of the following? #include void main() { char *ptr=“abcd” char ch; ch = ++*ptr++; cout |
A. | a |
B. | b |
C. | c |
D. | d |
Answer» C. c | |