Most Expected Question for Exam of C Language of BCA 2nd Semester

1)Explain algorithm and its features. how you will analyze the efficiency of an algorithm.

2) what is the Difference between “while” and “do-while” Loop? write a loop that calculate the sum of n elements of the following series:-

1+4+7+10+13………………………………..

(a)using while loop

(b)using do-while loop

3) List and explain the Arithmetic, Logical and Relational operators in c.          [ref chap-4]

4)What is typecast? Explain.

5) Explain any Five String functions with an example for each.

(Like;-strlen, strcpy, strncpy, strcat, strrev, strcmp, strlwr)-[ref chap 7]

6)write and explain the all types of functions with the help of an example for each.[ref chap 8, page64 block2]

7) Define the term variable. How it is used in c. Give example code. How to assign  values to it.[chapter 3 page 40 blok 1]

8)Explain the Different storage classes in c language.[ref chap-8 page 61 block2].

9) write and explain with example

(a)Goto       (b)Break      (c)Exit         (d)Continue          (e)getch      (f)getc         (g)putc         (h)void                   (i)malloc()        (j)Call by Value         (k)stepwise refinement technique

9)Explain the Different storage classes in c language.[ref chap-8 page 61 block2].

10)Define Types of variables.(automatic var,external var, static var,register var)

Or  define scope of variable.

11)Diff  between

(a)global vs. static variable

(b)static vs. Dynamic variable

(c) Structure and Union

(d)Random & Sequential File Access

(e) Call by value Call by reference

12) what is the purpose of using header files in C. Explain functions that are used in C for reading and writing of characters. Also, explain string input and output function in c. [like :-scanf(),pritf()]

13)what do you mean by array of pointers.

14) Explain the concept of File handling in C programming. Explain the use of fopen() and fclose() functions associated with it. Also mention Various modes in which a file can be allowed to open with an example for each.

16)define calloc(),malloc() & realloc().

17)Difference between logical error and runtime error

 

Programs:-            

1)write a program to find factorial of a no. also draw flow chart and algorithm.

2) what is recursion.write a program to find factorial of a no. using recursion.

3)reverse a given string

4)Without using string function like strcat() and strlen() write c program for the following:-

(a)To Concatenate 2 strings

(b)To find the length of any given String

5)write a program to test whether a given string is palindrome or not.

6)write a program to multiply two matrices of size MXN and NXP.

OR

Writhe the program to find the product of 2 matrices(matrix multiplication).

7)write a program to print Fibonacci series.(using recursion method also)

8)write a program to display the string

U                                                   C

UN                                                CO

UNI                                               COB

UNIX                         OR               COBO

UNIX                                             COBOL         (Both are same)

UNI                                               COBOL

UN                                                COBO

U                                                   COB

                                                     CO

                                                     C

9)write the program to display the String

 

C

CO

COB

COBO

COBOL     (Same as above program ,only half print)

10)Design an algorithm, draw a corresponding flow chart and write a program in c, to swap the values using pass by value and pass by reference methods.

11)check whether the given no is prime or not.

12)write a Structure for a student and write a c program to display the marks of the student for 5 subjects and also calculate the percentage of the marks obtained.

Or

Write a program in c using structure to calculate the Gross income and Net income if the Attendance, Basic Pay, Grade pay, Deduction and Allowances are given as input.

13)Write a program to swap two values of variables, using pointer.

14)Define a macro to find maximum among of 3 given numbers using #ifdef, #else.

(Visited 787 times, 1 visits today)