3i Infotech Papers: Sample Questions 125 - 126 of 1245

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

Question number: 125

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

Find the output for the following C program

  1. #include <stdio.h>
  2. main ()
  3. {
  4.     char * p1;
  5.     char * p2;
  6.     p1 = (char * ) malloc (25);
  7.     p2 = (char * ) malloc (25);
  8.     strcpy (p1, “Ramco” );
  9.     strcpy (p2, “Systems” );
  10.     strcat (p1p2);
  11.     printf ( “%s”, p1);
  12. }


  • In the program

Table showing the program

Table showing the program

char * p1;

  • Define the character pointer p1

char * p2;

  • Define the character pointer p2

p1 = (char *) malloc (25);

  • Pointer p1 using malloc function

  • Malloc () allocates the requested memory and returns a pointer to it.

p2 = (char *) malloc (25);

  • Pointer p2 using malloc function

strcpy (p1, “Ramco”);

  • strcpy () function- char * strcpy (char * dest, const char * str) copies the string pointed to by src to dest

Dest-this is the pointer to the destination array where the content is to be copied.

Src-this is the string to be copied.

  • strcpy (p1, “Ramco”) here p1 is dest and “Ramco” is src

strcpy (p2, “Systems”);

  • strcpy (p2, “Systems”) here p2 is dest and “Systems” is src

strcat (p1, p2);

  • char * strcat (char * dest, const char * src) appends the string pointed to by src to the end of the string pointed to by dest.

printf (“%s”, p1);

  • printf prints ” RamcoSystems”

Question number: 126

» Database » Oracle



Is the Following Statement True or False?

SNAPSHOTS cannot be refreshed automatically




  • Snapshot refresh group can specify an automatic refresh interval for the group.

  • When setting a group’s refresh interval, consider the following:

    • The dates or date expressions specifying the refresh interval must evaluate to future time.

    • The refresh interval must be greater than the length of time to perform a refresh.

    • Relative date expressions must evaluate to time relative to the most recent date.

    • Network or system failure can interfere with scheduled group refresh changing evaluation of relative date expression.

    • Explicit date expressions must evaluate to specific points in time, the most recent refresh date.