Operating system is
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.
Operating system is
ALU is a part of
Pointer is
Which will be the output ? void main () { int x = 7, y = 5; x = y++ + x++; y=++y + ++x; printf("%d%d", x, y); }
A function may contain
Which one of the following is a Bitwise operator ?
The output of int fact=1; for (i=0;i<fact;i++) { fact=fact*i; printf("%d", fact); }
Which one of the following declaration is invalid ?
Which one is the correct output ? char a[]="computer"; printf("%d",strlen(a));
In hexadecimal system D is equivalent to the number in decimal is
Describe the functions of various units of a digital computer using a neat block diagram.
Write a complete C program to generate Fibonacci series.
a) Convert (45-5675) into hexadecimal. b) What are 2's complement numbers ? What is signed magnitude number representation ? What is its disadvantage ?
Write a C program to check if a string taken as input is a palindrome or not without using string related functions supported by the compiler.
Write C program to print the following : 1 1 2 2 3 4 3 4 5 6 4 5 6 7 8
a) Write a comparative study between for, while and do-while loop. b) Write a complete C program to print the following pattern for n number of rows, where n is supplied externally. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * c) What is the difference between break and continue statement ? Explain with example.
a) What is subscripted variable ? b) Explain "C doesn't support Bound Checking". c) Write a complete C program to convert a decimal number consisting of arbitrary number of digits into its binary form using 1-D array. d) Write a complete C program to find out the Trace of a square matrix [Trace means the sum of Principal Diagonal Elements].
a) What is recursion ? b) What is the difference between recursion and iteration ? c) Write a function (Recursive/Non-Recursive) power (a, b) that can calculate a^b for any floating a and positive integer b. Invoke this function into main ( ) function to calculate x^n. d) Write a C function to find the length of a string and call the function from the main ( ) function. Do not use 'strlen' function in your program.
a) Explain with suitable example, the difference between structure and union in a C program. b) Suppose you have to create and maintain a Record Book of your company. Record Book consists of the following fields : (a) Employee's Name (b) Id Number (c) Salary Amount (d) Designation. How do you create and maintain this Record Book for 150 Employees of your organization if your management asks to see the salary of any particular employee ? c) Explain Call-by-Value and Call-by-Address with examples.
a) Write a C program that will receive a file name and a line of text as command line arguments and write the text to that file. b) Convert the following : (3FA)₁₆ to Octal (742)₈ to Binary (10110·0101)₂ to Decimal c) Represent the following expression using Logic Gates : S = (AX + BY) + (CD+EF)
Write short notes on any three of the following : a) Dynamic allocation of the memory b) Bitwise Operator c) Pointer Arithmetic d) Functions of Memory Unit of a Digital Computer e) Array of Structure f) Pointer to function and Function returning a Pointer.