What will be the output of the following C code? #include <stdio.h> void main() { int a[2][3] = {1, 2, 3, 4, 5}; int i = 0, j = 0; for (i = 0; i < 2; i++) for (j = 0; j < 3; j++) printf("%d", a[i][j]); }
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.
What will be the output of the following C code? #include <stdio.h> void main() { int a[2][3] = {1, 2, 3, 4, 5}; int i = 0, j = 0; for (i = 0; i < 2; i++) for (j = 0; j < 3; j++) printf("%d", a[i][j]); }
What is the worst case complexity of bubble sort?
What is the default return type of function definition?
What will be the output of the following C code? #include<stdio.h> main() { int n; n=f1(4); printf("%d",n); } int f1(int x) { int b; if(x==1) return 1; else b=x*f1(x-1); return b; }
What is the size of a C structure?
What will be the output? #include <stdio.h> int a=3, *b = &a; printf("%d",a*b);
Which language is written in binary codes only?
The C-preprocessors are specified with which symbol?
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input) #include <stdio.h> void main() { double ch; printf("enter a value between 1 to 2:"); scanf("%lf", &ch); switch (ch) { case 1: printf("1"); break; case 2: printf("2"); break; } }
What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?
What is the advantage of selection sort over other sorting techniques?
What is the limit for number of functions in a C Program?
Write the differences between call by value and call by reference.
Write a program to compute factorial of a number using recursion.
What is the difference between break and continue statement?
Differentiate between Compiler and interpreter?
Write a C program to perform addition, subtraction, multiplication and division of two numbers by using switch case.
Describe different types of asymptotic notation of complexity analysis of algorithms.
(a) Write a C program to find the maximum and minimum of some values using a function that returns an array. (b) Write an algorithm to sort an array using the Merge sort algorithm.
(a) Write a program in C language to print all palindrome numbers in a given range using a function. (b) Calculate the time complexity of Merge sort.
(a) What are the different types of Computer? (b) Write a C program to print the Fibonacci series upto nth term.