VB MJMA-16 C Programming, 2026

Visva-Bharati question paper, B.Sc. Mathematics Honours Semester VI, 2026. C Programming. Typed in LaTeX, searchable, with a printable PDF.

Open this paper in MathQP

  1. What is CPU? Name and discuss the functions of different units in CPU.
  2. A Fibonacci sequence is defined as follows: 0,1,1,2,3,5, cdots (X n+1 =X n+X n-1 ,n ge 1) . Draw a flowchart to find all the numbers of this sequence which are le 2026 .
  3. What do you mean by the efficiency of an algorithm? Design an algorithm to find the value of sin (x) defined by the infinite series sin (x)=x- frac x 3 3! + frac x 5 5! - frac x 7 7! + cdots , correct upto five decimal places.
  4. What is a string constant? How do string constants differ from character constants? Do string constants represent numerical values?
  5. Write appropriate declarations and assign the given initial values in C for the following group of variables and array. Integer variables: r 1=234,r 2=-43 Double precision variables: d 1=2.88 times 10 5 , d 2=0.0666666 Character variables: cv =new line character One -dimensional character array: fruit=``MANGO''
  6. How can the value of an expression be converted to a different data type? What is it called?
  7. A C program contains the following declarations and initial assignments int i = 8, j = 5; float x = 0.005, y = -0.01; char c = 'c', d = 'd'; Determine the value of each of the following expressions by mentioning all the necessary steps involved. (i) (i - 3 * j)% (c + 2 * d)/(x - y) (ii) i-= (j > 0) ? j : 0 (iii) (x > y) (i > 0) ! ! (j < 5) (iv) fabs(x + y)+floor(x + y)
  8. Find the error/output of the following C program. Give proper justification in support of your answer. # include < stdio.h > main() int x, y, z; x = -5 % -2; y = 5 % -2; z = -5 % 2; printf("% d % d % d", x, y, z);
  9. Write down the syntax of the do while loop. How does it differ from while loop?
  10. Find the output (mentioning all the necessary steps involved) of the following C program. # include < stdio.h > main() int i, j, k, x = 0; for(i = 0; i < 5; + + i) for(j = 0; j < i; + + j) k = i + j - 1; if(i % 2 == 0) x + = k; else if(k % 3 == 0) x + = k - 2; printf("% d", x); printf(" n x =% d", x);
  11. State (with suitable examples) differences between break statement and continue statement.
  12. What is a function when writing a C program? State two advantages to the use of functions.
  13. Write the first line of the function definition, including the formal argument declarations, for each of the following. (i) A function called value accepts two double-precision quantities and a short -integer quantity, and returns nothing. (ii) A function called process accepts an integer and two floating-point quantities, and return a double-precision quantity.
  14. Find the output (mentioning all the necessary steps involved) of the following C program. # include < stdio.h > int funct1 (int count); main() int a, count; for(count= 1; count<= 5; ++ count) a =funct1(count); printf("% d", a); int funct1(int x) return (x * x);
  15. Find the output of the following C program. Give proper justification in support of your answer. # include < stdio.h > main() int v1, v2, v3; int list[ 5 ] = -2, -1, 0, 1, 2 ; v1 = + + list[ 1 ]; v2 = list[ 1 ] + +; v3 = list[ v1 + + ]; printf("% d % d % d", v1, v2, v3);
  16. Describe the array that is defined in each of the following statements. Also indicate what values are assigned to the individual array elements. (i) int p[ 2 ][ 4 ] = 1, 3, 5, 7 , 2, 4, 6, 8 ; (ii) char flag[ 4 ]= 'T', 'R', 'U', 'E' ;
  17. Write a C program to find the factorial of any positive integer using one-dimensional array.