3i Infotech Papers: Sample Questions 254 - 256 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 254

» Basic CS » Data Structures

Essay Question▾

Describe in Detail

For the given graph, draw the DFS and BFS?

Image showing the graph

Image Showing the Graph

Image showing the graph

Explanation

Difference between DFS and BFS

Difference between DFS and BFS

Difference between DFS and BFS

BFS: A X G H P E M Y J

The BFS graphs

The BFS Graphs

The BFS graphs

DFS: A X H P E Y M J G

Shows the DFS graph

Shows the DFS Graph

Shows the DFS graph

Question number: 255

» Database » Oracle

MCQ▾

Question

Can an Alert message be changed at runtime?

Choices

Choice (4) Response

a.

Yes

b.

No

c.

Question does not provide sufficient data or is vague

d.

All of the above

Answer

a.

Explanation

Using predefine and customizing predefine alerts

Using Predefine and Customizing Predefine Alerts

Using predefine and customizing predefine alerts

  • Yes, Alert message can be changed at runtime.

  • We can use SET_ALERT_PROPERTY built-in to set the title of the alert.

  • Title, message and button label properties can be changed by using SET_ALERT_PROPERTY and SET_ALERT_BUTTON_PROPERTY.

  • Alert style and default alert button can also be changed but not at runtime- it is set at design time.

Question number: 256

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

What is the output of the following program?

  1. unc (ab)
  2. int ab;
  3. {
  4.     return (a = (a = = b) );
  5. }
  6. main ()
  7. {
  8.     int process (), func ();
  9.     printf ( “The value of process is %d ” process (func36) );
  10. }
  11. process (pfval1val2)
  12. int ( * pf) ();
  13. int val1val2;
  14. {
  15.     return ( ( * pf) (val1val2) );
  16. }

Explanation

The value of process is 0!

In the program

Table shows the program

Table shows the program

main ()

{

int process (), func ();

printf (“The value of process is % d! ” process (func, 3,6) );

}

main () invokes 2 functions

int process () and int func ()

process (pf, val1, val2)

int (* pf) ();

int val1, val2;

{

return ( (* pf) (val1, val2) );

}

The function ‘process’ has 3 parameters.

1st is pointer to another function, 2 and 3 integers.

When this function is invoked from main, the following substitutions for formal parameters take place: func for pf, 3 for val1 and 6 for val2.

This function returns the results of the operation performed by the function ‘func’.

func (a, b)

int a, b;

{

return (a = (a == b) );

}

The function func has two integer parameters.

The formal parameters are substituted as 3 for ‘a’ and 6 for ‘b’.

Since 3 is not equal to 6, a==b returns 0.

Therefore, the function returns 0 which in turn is returned by the function ‘process’.