1. Hierarchy decides which operator
A) is most important
B) is used first
C) is fastest
D) Operates on largest numbers

2. A pointer can hold
A) Single address at a time
B) Two addresses at a time
C) Number of addresses at a time
D) No address
3. An integer constant in C must have
A) At least one digit
B) At least one decimal point
C) A comma along with digits
D) Digits separated by commas

4. main() {
                Int a=3, b=2, c*d*e;
                d=&a; e=&b;
                c=*d+*e;
                }
                Which one of the given answers is correct?
A) a=4, c-6
B) a=3, c=5
C) a=3, c=6
D) a=3, c=8

5. In C a variable cannot contain
A) Blank Spaces
B) Decimal Point
C) Hyphen
D) All of the above

6. Assume that variable x resides at memory location 1234, y at 1111 and p at 2222.
                Int x=1, y=2, *p;
                p=&x;
                y=*p;
What will be the value of y after execution of above code?
A) 2
B) 1
C) 1234
D) 1111

7. Which of the following is FALSE in C?
A) Keywords can be used as variable names
B) Variable names can contain a digit
C) Variable names do not contain a blank space
D) Capital letters can be used in variables

8. If an integer occupies 4 bytes and a character occupies 1 byte of memory, each element of the following structure would occupy how many bytes ?
                struct name {
                int age;
                char name[30];
                };
A) 30
B) 32
C) 34
D) 36

9. The expression x=4+2 % -8 evaluates to
A) -6
B) 6
C) 4
D) None of the above

10. A structure brings together a group of
A) items of the same data type
B) related data items and variables
C) integers with user defined names
D) floating points with user defined names

Answers:
1. B) is used first
2. A) Single address at a time
3. A) At least one digit
4. B) a=3, c=5
5. A) Blank Spaces
6. B) 1
7. A) Keywords …… variable names
8. C) 34
9. B) 6
10. B) related data items and variables

You Might also view the following Related Posts

إرسال تعليق

 
Top