Professional Documents
Culture Documents
Name: Mobile:
void main()
printf("%d", ++(*p));
A. 6 B. 5
2. For 16-bit compiler allowable range for signed integer constants is ________?
1. DHCP
2. SMTP
3. HTTP
4. TFTP
5. FTP
4. Suppose a class has public visibility. In this class we define a protected method. Which of the
following statements is correct?
A. This method is only accessible from inside the class itself and from inside all subclasses.
B. In a class, you cannot declare methods with a lower visibility than the visibility of the class in
which it is defined.
1
C. From within protected methods you do not have access to public methods.
D. This method is accessible from within the class itself and from within all classes defined in the
same package as the class itself.
5. C preprocessor
main()
printf("%p", main);
7. int x = 0, y = 0 , z = 0 ;
A. -2 B. -1
C. 0 D. 1
int *ptr, p;
2
A. ptr is a pointer to integer, p is not.
A. pid B. du
C. ps D. au
11. What will be the return type of a method that not returns any value?
A. void B. int
A. catch B. throw
C. throws D. finally
int c = - -2;
A. 1 B. -2
C. compilation error D. 2
A. Theatro B. Thea_tro
3
16. Any C program
#include<stdio.h>
void main()
printf(5+"Good Morning\n");
C. Good D. Morning
A. Sequential
B. Random
19. Which of the following comments about the ++ operator are correct?
A. It is a unary operator B. The operand can come before or after the operator
20. What is the output of given program if user enter value 99?
#include<stdio.h>
void main()
int i;
4
printf("Enter a number:");
if(i%5 == 0){
A. Enter a number:
C. complier error