TCS Papers: Sample Questions 496 - 499 of 502

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

Question number: 496

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

What could be the problem if a valid function name such as tolower () is being reported by the c compiler as undefined?

Explanation

  • Probable reason behind this error is that the header file for that function was not included at the top of the program.

  • Header files contain the definition and prototype for functions and commands used in a C program.

  • For “tolower () “, the code “#include < ctype. h > ” must be present at the beginning of the program.

Question number: 497

» Basic CS » Data Structures

Short Answer Question▾

Write in Short

Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?

Explanation

  • No.

  • The Minimal spanning tree assures that the total weight of the tree is kept at its minimum.

  • But it does not guarantee minimum distance between any two nodes involved in the minimum-spanning tree.

Question number: 498

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

What is the equivalent code of the following statement in WHILE LOOP format?

Explanation

  • For (a = 1; a < =100; a++)

    Printf (“%d ”, a * a);

  • Same code as while loop:

  1. a=1;
  2. while(a<=100)
  3. printf(“%d  ”, a*a);
  4.     a++;
  5. }

Question number: 499

» Basic CS » Networks

Short Answer Question▾

Write in Short

What is terminal emulation, in which layer it comes?

Explanation

  • Telnet also called terminal emulation, is the ability to make one computer terminal appear like some other terminal.

  • Provides ability to log on and get direct access to legacy programs in a mainframe operating system.

  • Terminal emulation makes a computer appear like an actual terminal or client computer networked to a server or mainframe.

  • Terminal emulation comes in the application layer.