operation in 6 bit 2\'s complement notation? 011010 +101001 Options a) 3 b) -2 c
ID: 3709267 • Letter: O
Question
operation in 6 bit 2's complement notation? 011010 +101001 Options a) 3 b) -2 c) 3 d) 2 e) overflow 2) Which of the following statements is incorrect? Choose option e if all statements are correct Options a)int a-34; b) double float b c) unsigned char d, d) double c e) None of the above 3) Complete the following sentence: When passing a two dimensional array, which was declared as int arr100100, a function Options a) the first dimension size must be provided b) the second dimension size must be provided c) both dimensions must be provided d) it does not matter if the size of any of the dimensions is provided e) None of the above 4) A float number is stored in one byte such that the bit 7 is the sign bit, the next three bits represent the exponent excess-3 notation, and the four least significant bits represent the mantissa. The most significant bit (bit 7) is the most bit in a bit representation. What is the representation of the number 4.25 Options a) 01010010 b) 01000001 c) 00100010 d) 01010001 e) None of the above 5) What will be printed? If (CF- C)> 6Il (8-3-32) printf 1n") else printfo in") Options b) 0 c) This is an incorrect logical condition d) There will be a compile error e) There will be a runtime errorExplanation / Answer
2) From the given options, option b is incorrect
i.e double float b; because, two or more data types in declaration specifiers is not possible. Either
float or double is only possible.
3) From the given context, option e is right option.
When passing a 2-D array into function, no dimension is required in either of the subscript, simply by
passing array name into that can make a difference.
eg: int arr [100][100] = {{1,2,3},{4,5,6}};
findLargest(arr);
4) From the given code snippet below,
if(('F'-'C')>6 || ('8'-'3'-3==2))
printf("1 ");
else
printf("0 ");
The output is option a i.e 1
Because, the value for expression after logical or is true, even though 'F'-'C' is 3 and is false according to
given expression, since logical OR can have any expression is true.
17) From the given code,
int main()
{
int j;
for(j=0;j<5;j++){
int j=50;
printf("%d,",j);
j+=5;
}
return 0;
}
Option a is right answer, because every time loop is iterating, the value of j is assigned to 50,
so, it prints 50 with comma seperator for every iteration of loop. Hence the output is:
18) From the given code segment,
char ch1[] = "Winter!", *ch2="Ski!";
char ch;
int i;
ch = ch2[0];
i=0;
while(ch!=''){
ch1[i] = ch2[i];
i++;
ch = ch2[i];
}
The output for the above is option a, The string ch1 will contain the string "Ski!er!"
The first four characters of the Winter! in ch1 is replaced by the string Ski! in ch2 for each iteration of loop.
The loop will exit when it reaches the character.
19) Given statement will achieve option "a" as true answer.
i.e while('n'!=Response || 'N'!=Response), according to the given loop if user not type either 'n' or
'N', then loop is to be continued.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.