Академический Документы
Профессиональный Документы
Культура Документы
A. * (asterisk)
B. | (pipeline)
C. - (hyphen)
D. _ (underscore)
View Answer Discuss in Forum Workspace Report
4.
Is there any difference between following declarations?
1 : extern int fun();
2 : int fun();
A. ceil(1.66)
B. floor(1.66)
C. roundup(1.66)
D. roundto(1.66)
View Answer Discuss in Forum Workspace Report
1.
Which of the following is the correct order of evaluation for the below expression?
z = x + y * z / 4 % 2 - 1
A. * / % + - =
B. = * / % + -
C. / * % - + =
D. * % / - + =
View Answer Discuss in Forum Workspace Report
2.
Which of the following correctly shows the hierarchy of arithmetic operations in C?
A. / + * -
B. * - / +
C. + - / *
D. / * + -
View Answer Discuss in Forum Workspace Report
3.
Which of the following is the correct usage of conditional operators used in C?
A. f1, f2, f3
B. f3, f2, f1
C. Order may vary from compiler to compiler
D. None of above
View Answer Discuss in Forum Workspace Report
5.
Which of the following are unary operators in C?
1. !
2. sizeof
3. ~
4. &&
A. 1, 2
B. 1, 3
C. 2, 4
D. 1, 2, 3
View Answer Discuss in Forum Workspace Report
6.
In mathematics and computer programming, which is the correct order of mathematical
operators ?
A. Character
B. Integer
C. Float
D. enum
1.
What will happen if in a C program you assign a value to an array element whose
subscript exceeds the size of array?
1.
What is (void*)0?
char *p;
p = (char*) malloc(100);
A. char p = *malloc(100);
B. char *p = (char) malloc(100);
C. char *p = (char*)malloc(100);
D. char *p = (char *)(malloc*)(100);
View Answer Discuss in Forum Workspace Report
3.
In which header file is the NULL macro defined?
A. stdio.h
B. stddef.h
C. stdio.h and stddef.h
D. math.h
View Answer Discuss in Forum Workspace Report
4.
How many bytes are occupied by near, far and huge pointers (DOS)?
A. .
B. &
C. *
D. ->
View Answer Discuss in Forum Workspace Report
1.
Which of the following function sets first n characters of a string to a given
character?
A. strinit()
B. strnset()
C. strset()
D. strcset()
View Answer Discuss in Forum Workspace Report
2.
If the two strings are identical, then strcmp() function returns
A. -1
B. 1
C. 0
D. Yes
View Answer Discuss in Forum Workspace Report
3.
How will you print \n on the screen?
A. printf("\n");
B. echo "\\n";
C. printf('\n');
D. printf("\\n");
View Answer Discuss in Forum Workspace Report
4.
The library function used to find the last occurrence of a character in a string is
A. strnstr()
B. laststr()
C. strrchr()
D. strstr()
View Answer Discuss in Forum Workspace Report
5.
Which of the following function is used to find the first occurrence of a given
string in another string?
A. strchr()
B. strrchr()
C. strstr()
D. strnset()
View Answer Discuss in Forum Workspace Report
Java
1.
What is the name of the method used to start a thread execution?
A. init();
B. start();
C. run();
D. resume();
View Answer Discuss in Forum Workspace Report
2.
Which two are valid constructors for Thread?
notify();
notifyAll();
isInterrupted();
synchronized();
interrupt();
wait(long msecs);
sleep(long msecs);
yield();
A. 1, 2, 4
B. 2, 4, 5
C. 1, 2, 6
D. 2, 3, 4
View Answer Discuss in Forum Workspace Report
4.
class X implements Runnable
{
public static void main(String args[])
{
/* Missing code? */
}
public void run() {}
}
Which of the following line of code is suitable to start a thread ?
A. Thread t = new Thread(X);
B. Thread t = new Thread(X); t.start();
C. X run = new X(); Thread t = new Thread(run); t.start();
D. Thread t = new Thread(); x.run();
View Answer Discuss in Forum Workspace Report
5.
Which cannot directly cause a thread to stop executing?
box obj;
a) Memory address of allocated memory of object
b) NULL
c) Any arbitrary pointer
d) Garbage
View Answer
class main_class
{
public static void main(String args[])
{
int x = 9;
if (x == 9)
{
int x = 8;
System.out.println(x);
}
}
}
a) 9
b) 8
c) Compilation error
d) Runtime error
View Answer
5. For each attribute of a relation, there is a set of permitted values, called the
________ of that attribute.
a) Domain
b) Relation
c) Set
d) Schema
View Answer
6. Database __________ which is the logical design of the database, and the
database _______ which is a snapshot of the data in the database at a given instant
in time.
a) Instance, Schema
b) Relation, Schema
c) Relation, Domain
d) Schema, Instance
View Answer
7. Course(course_id,sec_id,semester)
Here the course_id,sec_id and semester are __________ and course is a _________
a) Relations, Attribute
b) Attributes, Relation
c) Tuple, Relation
d) Tuple, Attributes
View Answer
advertisement
8. Department (dept name, building, budget) and Employee (employee_id, name, dept
name, salary)
Here the dept_name attribute appears in both the relations. Here using common
attributes in relation schema is one way of relating ___________ relations.
a) Attributes of common
b) Tuple of common
c) Tuple of distinct
d) Attributes of distinct
View Answer
1. Which one of the following is a set of one or more attributes taken collectively
to uniquely identify a record?
a) Candidate key
b) Sub key
c) Super key
d) Foreign key
View Answer
2. Consider attributes ID, CITY and NAME. Which one of this can be considered as a
super key?
a) NAME
b) ID
c) CITY
d) CITY, ID
View Answer
7. An attribute in a relation is a foreign key if the _______ key from one relation
is used as an attribute in that relation.
a) Candidate
b) Primary
c) Super
d) Sub
View Answer
advertisement
8. The relation with the attribute which is the primary key is referenced in
another relation. The relation which has the attribute as a primary key is called
a) Referential relation
b) Referencing relation
c) Referenced relation
d) Referred relation
View Answer
9. The ______ is the one in which the primary key of one relation is used as a
normal attribute in another relation.
a) Referential relation
b) Referencing relation
c) Referenced relation
d) Referred relation
View Answer
1. Which one of the following is used to define the structure of the relation,
deleting relations and relating schemas?
a) DML(Data Manipulation Langauge)
b) DDL(Data Definition Langauge)
c) Query
d) Relational Schema
View Answer
2. Which one of the following provides the ability to query information from the
database and to insert tuples into, delete tuples from, and modify tuples in the
database?
a) DML(Data Manipulation Langauge)
b) DDL(Data Definition Langauge)
c) Query
d) Relational Schema
View Answer
3.
4.
5. The basic data type char(n) is a _____ length character string and varchar(n) is
_____ length character.
a) Fixed, equal
b) Equal, variable
c) Fixed, variable
d) Variable, equal
View Answer
8.
advertisement
9.
4. Pushing an element into stack already having five elements and stack size of 5 ,
then stack becomes
a) Overflow
b) Crash
c) Underflow
d) User flow
View Answer
10. Here is an infix expression: 4 + 3*(6*3-12). Suppose that we are using the
usual stack algorithm to convert the expression from infix to postfix notation.
The maximum number of symbols that will appear on the stack AT ONE TIME during the
conversion of this expression?
a) 1
b) 2
c) 3
d) 4
View Answer
1. What is the maximum number of children that a binary tree node can have?
a) 0
b) 1
c) 2
d) 3
View Answer