Technical Questions

Q:

Indicate what would the SWAP macro be expanded to on preprocessing. Would the code compile?

#define SWAP (a, b, c ) (c t; t = a, a = b, b = t; )

main()

{

    int x = 10, y = 20;

    SWAP (x, y, int );

    printf ( " %d%d ", x, y);

}

Answer

( int t ; t = a, a = b, b = t ;);


This code won't compile since declaration of t cannot occur within parentheses.


 

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2946
Q:

What is the strength of the signal transmitted by powerful cell phones?

Answer

the powerful cell phones can transmit a signal of 3 watts.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2923
Q:

What are the static and dynamic hazards in logic circuits?

Answer

If for a short period of time circuits goes to some different logic level then it is spposed to have then it is called static hazard. e.g., If the final logic value of output of given circuit becomes one vent if if is supposed to be zero then it is called static-0 Hazard and vice versa. Dynamic Hazard is the one in which the circuit output goes to some other logic level more than once then finally settling down to some appropriate level.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2902
Q:

What are the key object oriented concepts used by Windows NT?

Answer

Encapsulation, Object class and instance.

Report Error

View answer Workspace Report Error Discuss

1 2881
Q:

Differentiate between Complier and Interpreter?

Answer

An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions

Report Error

View answer Workspace Report Error Discuss

0 2872
Q:

There is a mistake in the following code. Add a statement in it to remove it.

main()

{

     int a;

     a = f (10, 3.14) ;

     printf ( " %d ", a );

}

f (int aa, float bb)

{

    return ( ( float ) aa + bb );

}

Answer

Add the following function prototype in main ():


float f ( int, float );

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2863
Q:

The no of entities participating in a relation is called

A) Relation B) Degree of relationship
C) Recursive relationship D) None of the above
 
Answer & Explanation Answer: B) Degree of relationship

Explanation:

The no of entities participating in relation is called Degree of relationship

Report Error

View Answer Report Error Discuss

Filed Under: Database
Job Role: Database Administration

0 2856
Q:

public static void main string[] args Meaning is?

Answer

Here in this declaration public static void main string[] args, each keyword has its importance.


 


1. public - Here public is an access specifier which allows the main method to be accessible everywhere.


 


2. static - static helps the main method to get loaded without getting called by any instance/object.


 


3. void - void clarifies that the main method will not return any value.


 


4. main - It's the name of the method.


 


5. String[] args - Here we are defining a String array to pass arguments at the command line. args is the variable name of the String array.

Report Error

View answer Workspace Report Error Discuss

8 2851