3i Infotech Papers: Sample Questions 487 - 488 of 1245

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

Question number: 487

» Database » Oracle

Short Answer Question▾

Write in Short

Name two utilities that Oracle provides, which are use for backup and recovery.

Explanation

  • Along with the RDBMS software, Oracle provides two utilities to back up and restore the database- Export and Import.

  • The Export utility dumps the definitions and data for the specified part of the database to an operating system binary file.

  • The Import utility reads the file produced by an export, recreates the definitions of objects, and inserts the data.

  • Used as a means of backing up and recovering the database, all the changes made to the database cannot be recovered since the export was performed.

Question number: 488

» Languages » C & C Plus Plus

MCQ▾

Question

What will be the result of the following program?

  1. char * gxxx ()
  2. {
  3.     static char xxx[1024];
  4.     return xxx;
  5. }
  6. main ()
  7. {
  8.     char * g = “string”;
  9.     strcpy (gxxx (), g);
  10.     g = gxxx ();
  11.     strcpy (g, “oldstring” );
  12.     printf ( “The string is: %s” gxxx () );
  13. }

Choices

Choice (4) Response

a.

The string is: String

b.

Syntax error during compilation

c.

Run time error/Core dump

d.

The string is: Oldstring

Answer

d.

Explanation

  • In the program

Table showing the program

Table showing the program

  1. char * gxxx ()
  2. {
  3.     static char xxx[1024];
  4.     return xxx;
  5. }
  • Define the pointer function gxxx ()

char * g = “string”;

  • Define the character pointer g= “string”

strcpy (gxxx (), g);

  • Here using the strcpy () function char * strcpy (char * dest, const char * src) copies the string pointed to, by “src” to dest.

g = gxxx ();

  • pointer g value stores the output of gxxx () function

strcpy (g, “oldstring”);

  • pointer g stores the string

printf (“The string is: %s” gxxx () );

  • printf prints “The string is: Oldstring”