

MCQOPTIONS
Saved Bookmarks
This section includes 623 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
601. |
. Storage location used by computer memory to store data for usage by an application is ? |
A. | Pointers |
B. | Constants |
C. | Variable |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
602. |
Why strings are of reference type in C#.NET ? |
A. | To create string on stack |
B. | To reduce size of string |
C. | To overcome problem of stackoverflow |
D. | None of the mentioned |
Answer» C. To overcome problem of stackoverflow | |
603. |
Verbatim string literal is better used for ? |
A. | Convenience and better readability of strings when string text consist of backlash characters |
B. | Used to initialize multi line strings |
C. | To embed a quotation mark by using double quotation marks inside a verbatim string |
D. | All of the mentioned |
Answer» E. | |
604. |
Correct statement about strings are ? |
A. | a string is created on the stack |
B. | a string is primitive in nature |
C. | a string created on heap |
D. | created of string on a stack or on a heap depends on the length of the string |
Answer» D. created of string on a stack or on a heap depends on the length of the string | |
605. |
For two strings s1 and s2 to be equal, which is the correct way to find if the contents of two strings are equal ? |
A. | if(s1 = s2) |
B. | int c; |
C. | = s1.CompareTo(s2); |
D. | if(strcmp(s1, s2)) |
Answer» C. = s1.CompareTo(s2); | |
606. |
Which is the String method used to compare two strings with each other ? |
A. | Compare To() |
B. | Compare() |
C. | Copy() |
D. | ConCat() |
Answer» C. Copy() | |
607. |
What is the Size of ‘Char’ datatype? |
A. | 8 bit |
B. | 12 bit |
C. | 16 bit |
D. | 20 bit |
Answer» D. 20 bit | |
608. |
Which of the following format specifiers is used to print hexadecimal values and return value of output as Octal equivalent in C# ? |
A. | %hx for small case letters and %HX for capital letters |
B. | %x for small case letters and %X for capital letters |
C. | No ease of doing it. C# don’t provides specifier like %x or %O to be used with ReadLine() OR WriteLine().We have to write our own function |
D. | %Ox for small case letters and %OX for capital letters |
Answer» D. %Ox for small case letters and %OX for capital letters | |
609. |
The Default value of Boolean Data Type is ? |
A. | 0 |
B. | True |
C. | False |
D. | 1 |
Answer» D. 1 | |
610. |
A float occupies 4 bytes. If the hexadecimal equivalent of these 4 bytes are A, B, C and D, then when this float is stored in memory in which of the following order do these bytes gets stored ? |
A. | ABCD |
B. | DCBA |
C. | 0 * ABCD |
D. | Depends on big endian or little endian architecture |
Answer» E. | |
611. |
Select appropriate difference between decimal, float and double data type in C# ? 1) Float and Double are floating binary point types while decimal is a floating decimal point type. 2) Precision difference for float is ‘7’ digit for double is ’15’ to ’16’ digit and for decimal is ’28’ to ’29’ digits. 3) Some values which cannot be exactly represented hence for those values float and double are more appropriate. |
A. | 1 |
B. | 1, 3 |
C. | 1, 2, 3 |
D. | 2, 3 |
Answer» D. 2, 3 | |
612. |
Minimum and Maximum range of values supported by ‘float’ data type are ? |
A. | 1.5 * 10-40 to 3.4 * 1038 |
B. | 1.5 * 10-45 to 3.4 * 1030 |
C. | c) 1.5 * 10-45 to 3.4 * 1038 |
D. | 1.5 * 10-45 to 3.4 * 1037 |
Answer» D. 1.5 * 10-45 to 3.4 * 1037 | |
613. |
Correct way to define a value 6.28 in a variable ‘pi’ where value cannot be modified ? |
A. | #define pi 6.28F |
B. | pi = 6.28F |
C. | const float pi = 6.28F |
D. | const float pipi = 6.28F |
Answer» D. const float pipi = 6.28F | |
614. |
Valid Size of float data type is ? |
A. | 10 Bytes |
B. | 6 Bytes |
C. | 4 Bytes |
D. | 8 Bytes |
Answer» D. 8 Bytes | |
615. |
Number of digits upto which precision value of float data type is valid ? |
A. | Upto 6 digit |
B. | Upto 8 digit |
C. | Upto 9 digit |
D. | Upto 7 digit |
Answer» E. | |
616. |
Select a convenient declaration and initialization of a floating point number: |
A. | float somevariable = 12.502D |
B. | float somevariable = (Double) 12.502D |
C. | float somevariable = (float) 12.502D |
D. | float somevariable = (Decimal)12.502D |
Answer» D. float somevariable = (Decimal)12.502D | |
617. |
Default Type of number without decimal is? |
A. | Long Int |
B. | Unsigned Long |
C. | Int |
D. | Unsigned Int |
Answer» D. Unsigned Int | |
618. |
Correct way to assign values to variable ‘c’ when int a=12, float b=3.5,int c |
A. | c = a + b; |
B. | c = a + int(float(b)); |
C. | c = a + convert.ToInt32(b); |
D. | c = int(a + b); |
Answer» D. c = int(a + b); | |
619. |
Which Conversion function of ‘Convert.TOInt32()’ and ‘Int32.Parse()’ is efficient? 1) Int32.Parse() is only used for strings and throws argument exception for null string 2) Convert.Int32() used for data types and returns directly ‘0’ for null string |
A. | 2 |
B. | Both 1,2 |
C. | 1 |
D. | None of the mentioned |
Answer» B. Both 1,2 | |
620. |
Which data type should be more preferred for storing a simple number like 35 to improve execution speed of a program? |
A. | sbyte |
B. | short |
C. | int |
D. | long |
Answer» B. short | |
621. |
Arrange the following data type in order of increasing magnitude sbyte, short, long, int. |
A. | long < short < int < sbyte |
B. | sbyte < short < int < long |
C. | short < sbyte < int < long |
D. | short < int < sbyte < long |
Answer» C. short < sbyte < int < long | |
622. |
Correct Declaration of Values to variables ‘a’ and ‘b’? |
A. | int a = 32, b = 40.6; |
B. | int a = 42; b = 40; |
C. | int a = 32; int b = 40; |
D. | int a = b = 42; |
Answer» D. int a = b = 42; | |
623. |
How many Bytes are stored by ‘Long’ Data type in C# .net? |
A. | 8 |
B. | 4 |
C. | 2 |
D. | 1 |
Answer» B. 4 | |