3i Infotech Papers: Sample Questions 629 - 630 of 1245

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

Question number: 629

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

  1. main ()
  2. {
  3.     int i = 1;
  4.     while (i ⇐ 5)
  5.     {
  6.         printf ( “%d” i);
  7.         if (i>=2)
  8.         goto here;
  9.         i + +;
  10.     }
  11. }
  12. fun ()
  13. {
  14.     here:
  15.     Printf ( “PP” );
  16. }

Explanation

  • In a program

Table shows the program

Table shows the program

int i = 1;

Assign the integer i = 1

while (i ⇐ 5)

{

Check the while condition is true or false

I value put in while loop

While (1 < =5)

{

The condition is true

Then apply next step

printf (“%d” i);

Print the value of i = 1

if (i > 2)

goto here;

i ++;

Check if condition

Here i = 1, if (1 > =2) condition false than apply

i++=2

then apply first to check while loop

while (2 ⇐ 5)

{

printf (“%d” i);

if (2 > =2)

here condition is true so apply next step

goto here;

  • The label ‘here’ is available in function fun () hence it is not visible in function main ().

  • So, the answer is Compiler error: Undefined label ‘here’ in function main.

Question number: 630

» Database » MySQL

Essay Question▾

Describe in Detail

What is Pro * C? What is OCI?

Explanation

Pro * C:

  • The Pro * c/C++ precompiler takes the SQL statement that embedded in C/C++ code convert into standard C/C++ code

  • The precompiler accepts the source program as input, translates the embedded SQL statements into standard Oracle run-time library calls, and generates a modified source program that you can compile, link, and run.

    OCI (Oracle Call Interface)

  • OCI refers to Oracle Call interface is set of Low Lavel API (Application Program Interface Call) used to interact with Oracle database. .

  • By OCI one can use the operation such as Logon, Fatch, parse, excute etc. Generally, these are written in C/C++.

  • These can be written in any language.