1. The set of rules that define the logic of problem in simple English is known as:
(A)   flow chart    (B)   program   (C)   algorithm    (D) language   
Ans. (B)

2. Which symbol of flowchart represents a decision point in a program:
(A)  Diamond shaped   (B)  oval shaped  (C)   rectangular shaped  (D)circle shaped
Ans. (A)

3. Find the invalid statement:
(A) A program witten in good style is easily understandable
(B) Informative comments are executable statement 
(C) A portable program can be easily moved ti different computer system
(D) A well structured program consist of a number of modules
Ans. (B)

4. when you run the program does not stop running ‘ then what type of error is: 
(A) run time error    (B)  syntax error  (C)  logical error (D) compiltion error
Ans. (A) 

5. if variable in C language is not declared for its type, then what type of error in C:
(A)  run time error   (B) syntax error   (C) logical error   (D)  Execution error
Ans. (B)

6. Which of the following statement is syntactically correct in C:
(A) X=A/D + C*E      (B) x: = X+1            (C) x(i) = x(i)+1      (D) x1y=1
Ans. (A)

7. Debugging is the:
(A) Process of executing a program      (C)  process of finding and correcting the errors
(B) process of testing a program using data   (D)      None of the above
Ans. (C)

8. Which of the following are token in C:
(A)Keywords            (B) Variables          (C) Constants         (D) All of the above
Ans. (A)

9. Error occurs during the execution of a program is known as:
(A) Syntax error     (B)  logical error   (C)  Runtime error   (D) No error
Ans. (C)

10. Which of the following statement is true:
(A) One if can have more than one else clause
(B) A switch expression can be of any type
(C) X=x%y can be written as x%=y
(D) If (condition) must be terminated by semicolon
Ans. (D)
12.  Which of the following is valid string constant :
(A)  .0001                (B)  -1.7ge               (C) 5*1.5                  (D)  $ 25
Ans. (A)

13. Which of the following is not a control string :
(A)  “well done”    (B)  “well done       (C) ‘well done’        (D) (well done)
Ans. (A)

14. Which of the following  is not a control string :
(A) %d                    (B) %0                      (C) %f                         (D) %p
Ans. (B)

15. Which header file must be included when pow (x,y) function is used in the program :
(A) maths.h          (B) math.h            (C) stat.h                 (D) stdio.h
Ans. (B)

16. Which of the following statement is true :
(A) One if can have more than one else clause
(B) A switch expression can be of any type 
(C) X=x%y can be written as x%=y
(D) If (condition) must be terminated by semicolon
Ans. (C)

17. If p=5 and q=-5 what would be the output of the following code:
If(p<0)&&(q<0)
Printf(“p is positive in”);
Printf(“q is negative in”);
(A)  P is positive                             (C)  q is negative
(B)  P is positive , q is negative             (D)  none of the above
Ans.   (C)

18. What would be the output of the following code:
int x,y;
y=20;
x=20/2*y;

(A)  X=200                                      (C) x=1
(B)  X=20                                       (D) x=10
Ans.  (A)

19. What would be the output of the following code:

int i=205;
i%=100;

(A) i=2                                         (C) i=5
(B) i=100                                       (D) i=205
Ans. (C) 

20. What would be the output of the following code:

Int i=15<10;

(A) i=0                                      (C) i=1
(B) i=15                                     (D) error in the satatement
Ans.  (D)

21. What would be the output of the following code:

Int k=7/3;

(A) K=2.00             (C) k=2.33
(B) K=2            (D) k=2.5
Ans. (B)

22. How many times will the following program print’computer’:

#include<stdio.h>
Void main(
{
 while (1)
 {
  Printf(“computer“);
 }
}

(A) One time                                 (C) two time
(B) Infinite time                            (D) no output
Ans. (B)

23. hat will be the output of following code:

for(i=1;i<4;i++)
printf(“%d|t”,i);

(A) error in the statement                  (C)  5
(B)  1 2 3 4                                (D)  4
Ans. (A)

24. Find valid statement:
(A) In while loop the body of the is repeated as long as condition remains false
(B) There is no difference between break and goto statement 
(C) Goto is a conditional transfer statement 
(D) In the do while loop the body of the loop   is executed at least once without performing my test
Ans. (D)


25. Which of the following declaration is valid:

(A) int score (100);     (C) Char n[5];
(B) Float val [10,15];     (D) float f[10,5];

Ans. (C)


26. String array is terminated by:

(A) ‘\c’       (C) ‘\o’
(B)  ‘\n’      (D)  ‘\t’

Ans. (C)


27. When strcpy () function is used in a program which file must be included:

(A) Conio.h   (B) string    (C)  Ctype.h  (D) character.h

Ans. (B)


28. Double power() function prototype specify as:

(A) Function without argument and no return values
(B) Function with argument and return double data type
(C) Function without argument and return double data type
(D) Function with double data type and return No values

Ans. (C)


29. Which of the following is invalid statement :

(A) A return statement can occur anywhere within the body of a function
(B) A function may be placed either after or before the main function
(C) Function return float values by default
(D) When more functions are used they may appear in any order

Ans. (C) 


30. What is recursion:

(A) A function called within another function 
(B) A function call itself
(C) A Function which return nothing 
(D) A function which have only return statement

Ans. (B)


31. What one is not a type of storage variable:

(A)  Register   (B)  static  (C) extern  (D) storage

Ans. ()


32. The default type of main() is:

(A) Int   (B)  void  (C)  char  (D) float

Ans. (B)


33. The variable declared outside the main () function is known as a …………variable:

(A) Local  (B)  global  (C) interger  (D) float

Ans. (B)


34. Recursive function are executed in a:

(A) Last In First Our Order    (C)  First In First Our Order
(B) In any order                (D) None of the above

Ans. ()


35. Which string function used ti find out length of given string:

(A) Strlen ()  (B) Strlength () (C) StrIn ()  (D)Strnlen ()

Ans. (A)


36. An array are passed as argument to a function by:

(A) By value  ` (B) by reference (C) both a & b   (D) None

Ans. (C)


37. If f1 and f2 are file pointers then fclose() function can be used as:

(A) Fclose (F1.F2)    (C) F1 = Fclose (F2)  
(B) Fclose (F1); Fclose(F2);   (D) None of the above

Ans. (D)


38. Fopen() function used in:

(A) r,w,a mode (B) r,w,c mode (C) r,w,x mode (D) a,c,x mode

Ans. () 


39. Rewind() function sed for:

(A) Set the position to the desired point in the file 
(B) Set the position to the beinging of the file 
(C) Set at current position in the file
(D) Set the position to the end of the file

Ans. ()


40. Struct date:

{ int day;
 Char mon[3];
Int year;
} p;

(A)  5   (B)  7     (C)  9     (D)  11

Ans. (A)


41. Union item:

{ int m;
 Float x;
 Char c;
          } code;
    Output of size of (code) is:

(A)  1   (B)  2   (C)  4   (D)  7

Ans. (C)


42. Member of a structure can be accessed using which operator?

(A)  .   (B)  *   (C)  &  (D)  :

Ans. (A)


43. Which is the correct way to define a pointer:

(A) Int & X;   (B) int *X;  (C)  *int X        (D)  &int X;

Ans. (B)


44. If a variable is a pointer to a structure then which of the following operator is used to access data members of the structure throught the pointer variable:

(A) .   (B)  &   (C)  *   (D) 

Ans. ()


45. Which function is used for reading for reading a multi-word string:

(A)  Gete ()  (B)  gets ()  (C) puts ()  (D) puts ()  


Ans. (B)

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA