Technology Questions

Q:

Which of the following is a properly defined structure?

A) struct {int a;} B) struct a_struct {int a;}
C) struct a_struct int a; D) struct a_struct {int a;};
 
Answer & Explanation Answer: D) struct a_struct {int a;};

Explanation:

The a_struct is declared as structure name and its data element is a.

Report Error

View Answer Report Error Discuss

Filed Under: C++

11 23583
Q:

void waitForSignal() {

Object obj = new Object();

synchronized (Thread.currentThread()) {

obj.wait();

obj.notify();

}

}

Which statement is true?

A) This code can throw an InterruptedException. B) This code can throw an IllegalMonitorStateException.
C) This code can throw a TimeoutException after ten minutes D) All the above
 
Answer & Explanation Answer: B) This code can throw an IllegalMonitorStateException.

Explanation:

It will throw  IllegalMonitorStateException.

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: IT Trainer

6 22945
Q:

What is RDBMS? Explain its features.

Answer

RDBMS is a database management system based on relational model defined by E.F.Codd. Data is stored in the form of rows and columns. The relations among tables are also stored in the form of the table.

Features:
- Provides data to be stored in tables
- Persists data in the form of rows and columns
- Provides facility primary key, to uniquely identify the rows
- Creates indexes for quicker data retrieval
- Provides a virtual table creation in which sensitive data can be stored and simplified query can be applied.(views)
- Sharing a common column in two or more tables(primary key and foreign key)
- Provides multi user accessibility that can be controlled by individual users

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

44 22872
Q:

Which of the following is not considered a JavaScript operator?

A) new B) this
C) delete D) typeof
 
Answer & Explanation Answer: B) this

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Web Technology

5 22811
Q:

public abstract class Shape {

private int x;

private int y;

public abstract void draw();

public void setAnchor(int x, int y) {

this.x = x;

this.y = y;

}

}

Which two classes use the Shape class correctly?

A) public class Circle implements Shape { private int radius; B) public abstract class Circle extends Shape { private int radius; }
C) public class Circle extends Shape { private int radius; public void draw(); D) None
 
Answer & Explanation Answer: B) public abstract class Circle extends Shape { private int radius; }

Explanation:

Only B is true

Report Error

View Answer Report Error Discuss

Filed Under: Java

0 22573
Q:

public class Threads2 implements Runnable {

public void run() {

System.out.println("run.");

throw new RuntimeException("Problem");

Which among the following is true?

}

public static void main(String[] args) {

Thread t = new Thread(new Threads2());

t.start();

System.out.println("End of method.");

}

}

A) java.lang.RuntimeException: Problem B) run. java.lang.RuntimeException: Problem
C) End of method. java.lang.RuntimeException: Problem D) End of method. run. java.lang.RuntimeException: Problem
 
Answer & Explanation Answer: D) End of method. run. java.lang.RuntimeException: Problem

Explanation:

Only D can be true

Report Error

View Answer Report Error Discuss

Filed Under: Java

0 22098
Q:

What is function prototyping? What are its advantages?

Answer

Function prototyping is a function declaration statement that tells the compiler about the return type of the function and the number as well as type of arguments required by the function at the time of calling it.


Syntax:


return_type function_name( type1 arg1, type 2 arg2, ... );


 


Advantages of function prototype :


- It helps the compiler in determining whether a function is called correctly or not. Each time when a function is called, its calling statement is compared with its prototype. In case of any mismatch, compiler reports an error.


- A function must be defined before calling it. But prototyping allows a function to be called before defining it.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

34 21749
Q:

Which is more effective while calling the functions?

A) call by value B) call by reference
C) call by pointer D) none
 
Answer & Explanation Answer: B) call by reference

Explanation:

In the call by reference, it will just copy the address of the variable to access it, so it will reduce the memory in accessing it.

Report Error

View Answer Report Error Discuss

Filed Under: C++

15 21517