Thursday 2 February 2012

Variable Name Type Question

1. What will be output of the following c program ?
#include<stdio.h>
int abc=10;
int main(){
int abc=20;
printf("%d",abc);
return 0;
}
A) 10
B) 20
C) 30
D) Compilation error

Answer  : B

2. What will be output of the following c program?
#include<stdio.h>

int main(){
int main=20;
printf("%d",main);
return 0;
}
A) 80
B) 0
C) 30
D) Compilation error

Answer  :A

Tuesday 31 January 2012

Two Line Question of C

1. What are the header file ?
2. What is the difference between the functions strdup and atrcpy in C?
3. What is difference between for loop and while loop in C language ?
4. Write down the equivalent pointer expression for referring the same element as a [i] [j][k][l].
5. What does static variable mean?
6. What is a pointer ?
7. What is a structure ?
8. What are the differences between structures and arryas
9.  In header files whether function are declared or defined 
10. what are differences between malloc() and calloc()?

Objective Question of C Introduction

21. What are the types of linkages
A. Internal and External
B. External , Internal and None
C. External and None
D. Internal
Answer : B

22. Which of the following special symbol allowed in variable name ?
A. * (astrisk)
B. | (pipline)
C. - (hyphen)
D. _ (underscore)
Answer : D

23. By default a real number is treated as a
A. float
B. double
C. long double
D far double
Answer : B

24. A long double cand be used if range of a double is not enough to accommodate a real number.
A. True
B. False
Answer : A

25. A float is 4 bytes wide , whereas a double is 8 bytes wide.
A. True
B. False
Answer : A

26.  Range of float id -2.25e-308 to 2.25e+308
A. True
B. False
Answer : B

27. Which of the following is integral data type ?
A. void
B. Char
E. float
D. double
Answer : B

28. What is the range of signed int data type in that compiler in which size of int is two byte
A. -255 to 255
B. - 32767 to 32767
C. -32768 to 32768
D. -32768 to 32767
Answer : D

29. What is size of genric pointer in c? 
A. 0
B. 1
C. 2
D. Null

Answer : C





Monday 30 January 2012

Objective Question of C Introduction

11. Which escape character can be used to begin a new line C?
A. \a
B. \b
C. \m
D. \n
Answer :

12. Which excape character can be to beep from speaker in C?A. \a
B. \b
C. \m
D. \n
Answer :

13. Character constants should be enclosed between__
A. Single Quotes
B. Double Quotes
C. Both a and b
D. None of these
Answer :

14. String constants should be enclosed between __
A. Single Quotes
B. Double Quotes
C. Both a and b
D. None of these
Answer :

15. Which of the follwing is invalid ?
A.''
B." "
C.'a'
D. 'abc'
Answer :

16. The maxiumum length of a variable in C is ___
A. 8
B. 16
C. 32
D. 64
Answer :

17. What will be the maximum size of a float  variable ?
A. 1 byte
B. 2 bytes
C. 4 bytes
D. 8 bytes
Answer :

18. What will be the maximum size of a double variable ?
A. 1 byte
B. 4 bytes
C. 8bytes
D. 16 bytes
Answer :

19. A declaration float a, b; occupies ___ of memory
A. 1 byte
B. 4 bytes
C. 8 bytes
D. 16 bytes
Answer :

20.The size of a String variable is
A. 1 byte
B. 8 bytes
C. 16 bytes
D. None of these
Answer :

Objective Question C Introduction

1. Which of the following langauge is predecessor to C Programming Language ?
(A) A.
(B) B
(C) BCPL
(D) C++
Answer :

2. C pogramming language was developed by
A. Dennis Ritchie
B. Ken Thompson
C. Bill Gates
D. Peter Norton
Answer :

3. C programming language was developed by
A. 1970
B. 1972
C. 1976
D. 1980
Answer :

4. C is a -------- language
A. High Level
B. Low Level
C. Middle Level
D. Machine Level
Answer :

5. C language is available for which of the following Operating Systgem ?
A. Dos
B. Windows
C. Unix
D. All of these

6. Which of the following symbol is used to denote a pre-processor statement ?
A. !
B. #
C. ~
D, ;
Answer :

7. Which of the following is a Scalar Data type
A. Float
B. Union
C. Array
D. Pointer
Answer :

8. Which of the following are tokens in C?
A. Keywords
B. Varables
C. Constants
D. All of the above
Answer :

9. What is the valid range of numbers for int type of data ?
A. 0 to 256
B. -32768 to +32767
C. -65536 to +65536
D. No specific Range
Answer :

10. Which symbol is used as a statement terminator in C?
A. !
B. #
C. ~
D, ;
Answer :

Tuesday 24 January 2012

Ultimate GK Guide for Computer Exam

1. UNIVAC is
a. Universal Automatic Computer
b. Universal Array Computer
c. Unique Automatic computer
d. Unvalued Automatic Computer
Answer

2. ALU is
a. Arithmetic Logic Unit
b. Array Logic Unit
c. Application Logic Unit
d. None of above
Answer :


3. VGA is
a. Video Graphics Array
b. Visual Graphics Array
c. Volatile Graphics Array
d. Video Graphics Adapter
Answer

4. MSI stand for
a. Medium Scale Intergrated Circuits
b. Medium System Integrated Circuits
c. Medium Scale Intelligen Circuit
d. Medium System Intelligent Circuit
Answer :


5. The first Computer introduced in Nepal was
a. IBM 1400
b. IBM 1401
c, IBM 1402
d. IBM 1403
answer :