1) Base of hexadecimal number system? Answer : 16 2) Universal gate in digital logic? Answer : NAND 3) Memory type that is non-volatile? Answer : ROM 4) Basic building block of digital circuits? Answer : Gate 5) Device used for data storage in sequential circuits? Answer : Flip-flop 6) Architecture with shared memory for instructions and data? Answer : von Neumann 7) The smallest unit of data in computing? Answer : Bit 8) Unit that performs arithmetic operations in a CPU? Answer : ALU 9) Memory faster than main memory but smaller in size? Answer : Cache 10) System cycle that includes fetch, decode, and execute? Answer : Instruction 11) Type of circuit where output depends on present input only? Answer : Combinational 12) The binary equivalent of decimal 10? Answer : 1010 13) Memory used for high-speed temporary storage in a CPU? Answer : Register 14) Method of representing negative numbers in binary? Answer : Two's complement 15) Gate that inverts its input signal? Answer : NOT 16)...
C program to find the greatest among three integers:
#include <stdio.h>
int main() {
int num1, num2, num3;
printf("Enter three integers: ");
scanf("%d %d %d", &num1, &num2, &num3);
if(num1 > num2 && num1 > num3) {
printf("%d is the greatest.", num1);
}
else if(num2 > num1 && num2 > num3) {
printf("%d is the greatest.", num2);
}
else {
printf("%d is the greatest.", num3);
}
return 0;
}
In this program, we first declare three integer variables num1, num2, and num3. We then prompt the user to enter three integers using printf() and read those integers using scanf().
Next, we use a series of if and else if statements to compare the three numbers and determine which is the greatest. We use the logical operators && and || to combine conditions where necessary.
Finally, we print the result using printf().
Sample output :
The output of the program will depend on the values of the three integers entered by the user. Here's an example of what the output might look like for different inputs:
Example 1:
Enter three integers: 10 20 30
30 is the greatest.
Example 2:
Enter three integers: 20 10 20
20 is the greatest.
Example 3
Enter three integers: 5 5 5
5 is the greatest.
In Example 1, the greatest number is 30, so the program outputs "30 is the greatest."
In Example 2, the greatest number is 20, so the program outputs "20 is the greatest."
In Example 3, all three numbers are equal, so the program outputs "5 is the greatest."