Documente Academic
Documente Profesional
Documente Cultură
4. Which one of the following is not a reserved keyword for C?A. auto B. case C. main D. default E.
register
A. A number B. A special symbol other than underscore C. Both of the above D. An alphabet
6. If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?a.
7. Which classes allow primitive types to be accessed as objects?a. Storage b. Virtual c. Friend
d. Wrapper
c. When type requested for new operation is considered bad,this exception is thrown
10. Which of the following is a valid destructor of the class name "Country"
11. In SQL, which command is used to remove a stored function from the database?
FUNCTION
12. In SQL, which command is used to select only one copy of each set of duplicate rows
A) SELECT DISTINCT B) SELECT UNIQUE C) SELECT DIFFERENT D) All of the
above
14. Composite key is made up of ................A) One column B) One super key C) One foreign key D)
15. What command is used to get back the privileges offered by the GRANT command?
16.A webpage displays a picture. What tag was used to display that picture?
17. <b> tag makes the enclosed text bold. What is other tag to make text bold?
18. Tags and test that are not directly displayed on the page are written in _____ section.
19. What does vlink attribute mean?a. visited link b. virtual link c. very good link d. active link
all of above
21. In Java variables, if first increment of the variable takes place and then the assignment occurs. This
pre incrementation
22. When the operators are having the same priority, they are evaluated from................. ............. in the
order they appear in the expression. A) right to left B) left to right C) any of the order
D) depends on compiler
23. In java, can only test for equality, where as ............ can evaluate any type of the Boolean expression.
24. The...................... looks only for a match between the value of the expression and one of its case
constants.
A) if B) match C) switch D) None of the above
25. System.in.read () is being used, the program must specify the .................. clause.
A) throws.java.out.IOException B)throws.java.in.IOException
C) throws.java.io.IOException D)throws.java.io.InException
#include <stdio.h>
int main()
{ int a = 10;
double b = 5.6;
int c;
c = a + b;
printf("%d", c);
} a) 15 b) 16 c) 15.6 d) 10
#include <stdio.h>
void main()
{ int a = 3;
#include <stdio.h>
struct temp
{ int a;
int b;
int c; };
main()
{ struct temp p[] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; }
#include <stdio.h>
struct temp
{ int a;
int b;
main()
{ printf("%d", sizeof(p)); }
#include <stdio.h>
struct student
{ char *name; };
void main()
{ s[0].name = "alan";
s[1] = s[0];
s[1].name = "turing";
a) alan alan alan turing b) alan alan turing turing c) alan turing alan turing d) Run time error
class A{
public static void main(String args[]){
int x;
x = 10;
if(x == 10){
int y = 20;
y = x*2; }
y = 100;
A. 10 20 10 100 B. 10 20 10 20 C. 10 20 10 10 D. Error
class A{
byte b;
int i = 258;
double d = 325.59;
b = (byte) i;
System.out.print(b);
i = (int) d;
System.out.print(i);
b = (byte) d;
System.out.print(b); } }
System.out.print("float"); }
test(99.9); } }
System.out.println( STATIC );
int Integer = 34 ;
System.out.print( Integer ) ;
System.out.print( String ) ;
A. Does not compile as Integer and String are API class names. B. Throws exception. C. 34 D. S E.
34 S
static int x = 10 ;
test.x += 1 ;
#include <stdio.h>
struct student
{
char *name;
};
void main()
s[0].name = "alan";
s[1] = s[0];
r = s;
struct student
char *name;
};
void main()
#include <stdio.h>
struct student
{ };
void main()
{ struct student s[2];
printf("%d", sizeof(s)); }
a) 2 b) 4 c) 8 d) 0
40. What is the output of this C code if there is no error in stream fp?
#include <stdio.h>
int main()
FILE *fp;
fp = fopen("newfile", "w");
printf("%d\n", ferror(fp));
return 0;