Which of the following is a bitwise operator?
Official theoretical question paper for Programming For Problem Solving (ES-CS201) conducted by Maulana Abul Kalam Azad University of Technology. All questions from Groups A, B, and C are reproduced below with marks weightings.
Which of the following is a bitwise operator?
Main() { int x = 2, y = 4; x = x++ + ++y; printf("\n%d %d", x, y); }
The function used to detect the end of file is
Arithmetic Logic Unit (ALU) is a part of a
Void main() { int a = 4, b = 5; printf("\n%d",(a > b)? a : b); }
ASCII value of 'B' is
#define PROD(a,b) a * b Void main() { Int x = 2, y = 3; Printf("\n%d", PROD(x + 2, y - 10)); }
Members of a union use
De Morgan's second theorem says that a NAND gate is equivalent to a bubbled ________ gate.
Main() { int n = 8; n = n >> 2; printf("\n%d",n); }
A pointer is
RAM Stands for
What is recursion? Explain with an example.
What is ternary operator?
What is dynamic memory allocation?
Write down the difference between malloc() and calloc().
Describe the functions of various units of a digital computer using a neat block diagram.
Write a flowchart to compute the sum of all perfect numbers within a given range taken as input from the user. A number is called a perfect number when it is equal to the sum of its positive divisors excluding the number itself.
Convert the following hexadecimal number to octal: (BEF2.09E)₁₆ = (?)₈
What is the disadvantage of 1's complement number representation? How is the problem overcome in 2's complement? Explain with an example.
Write a C program to generate the following pattern: G F E D C B A F E D C B A E D C B A D C B A C B A B A A
Differentiate between break and continue statements with an example. How does break differ from exit()?
How is a compiler different from an interpreter?
Which logic gates are called universal gates and why?
What is the difference between a character array and a string?
Simplify the following Boolean expression: $\overline{A}(A+B)+(B+A)(A+\overline{B})$
Write a function to sort an array. Display the sorted array inside the main() function.
How does call by value method differs from call by address method? Give examples.
Name two functions in C which can be used to create arrays dynamically. How are those two functions different from each other?
What are auto, extern and static variables? Explain their use with suitable examples.
Write a program to copy the contents of a file into another file.
Create a structure named books which has the following variables: Name, id, price, subject Write a program which will take details about 'n' books from the user. Write a function which will display the names of the books which fall within a given price range. Also write a function which will display the books for a certain given subject.
Write a program which will create an n × n matrix. Transpose the matrix by passing it to a function.
What should be the output of the following code fragment? #define SQ(x) x * x Printf("%d",sq(4+2));
Construct a circuit diagram for the following Boolean expression: $AB(\overline{A}+B)(\overline{B}+A)$
Explain the role of a C preprocessor. What is macro and how is it different from a C variable name?
Write a function which will split a string into two halves and return the result as an array of strings.