Recent questions tagged goclasses-cs-dpp-day-287

2 2 votes
2 2 answers
194
194 views
4 4 votes
2 2 answers
192
192 views
4 4 votes
3 3 answers
211
211 views
Given that $A$ and $B$ are two $8$-bit $2$’s complement numbers where $A=10000001$ and $B=11111110$, then the sum $A+B$ is:$01111111$ $10000011$ $01111101$ $11111111$
4 4 votes
1 1 answer
162
162 views
In an $n$-bit signed number system, zero has exactly $2$ different representations in which of the following representations?Sign-magnitude and $1$’s complement only $2$’...
8 8 votes
2 2 answers
204
204 views
Let $X$ be the number of distinct $12$-bit integers representable in $2$’s complement form. Let $Y$ be the number of distinct $12$-bit integers representable in $1$’s com...
5 5 votes
2 2 answers
367
367 views
What is the output of the following code?#include <stdio.h int main() { int i, sum = 0; for (i = 1; i <= 6; i++) { if (i % 2 == 0) continue; sum = sum + i; if (sum 6) br...
13 13 votes
3 3 answers
418
418 views
What is the output of the following code?#include <stdio.h int main() { int a = 0, b = 5, c = 10; int ans = a++ && ++b || c ; printf("%d %d %d %d", ans, a, b, c); return ...
7 7 votes
2 2 answers
295
295 views
What is the output of the following code?#include <stdio.h int main() { int a = 5, b = 2; float x = a / b + 0.5; printf("%.1f", x); return 0; }
7 7 votes
2 2 answers
270
270 views
What is the output of the following code?#include <stdio.h int main() { float x = 5 / 2; printf("%.1f", x); printf(" "); float y = 5.0 / 2; printf("%.1f", y); return 0; }...
7 7 votes
3 3 answers
469
469 views
What is the output of the following code?#include <stdio.h int main() { int x = 5; printf("%d", x++); printf("%d", ++x); return 0; }$57$ $67$ Compilation error Undefined ...
To see more, click for the full list of questions or popular tags.