3i Infotech Placement: Sample Questions 180 - 182 of 1245

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 180

Edit

Describe in Detail

Essay▾

What are the UNIX system calls for I/O?

Explanation

  • creat (name, permissions) :
    • Used to creat a file with the name and mode specified.
    • Permission would a number.
  • open (name, mode)
    • Used to open a file name
  • close (fd)
    • Closes an opened file.
  • unlink (fd)
    • Deletes a file.
  • read (fd, buffer, n_to_read)
    • Reads data from a file.
  • write (fd, buffer, n_to_write)
    • Writes data to a file.
  • Iseek (fd, offset, whence)
    • Moves the read/write pointer to the specified location
  • Dup
    • Makes a duplicate copy of existing file descriptor.
  • Fcntl
    • Makes the changes to the properties of an open file.

Question 181

Edit

Write in Short

Short Answer▾
  1. #definesquare (x) x ⚹x
  2. main ()
  3. {
  4.     inti;
  5.     i =64/square (4);
  6.     printf ( “%d” i);
  7. }

Explanation

In a program

Table Shows the Program
int i;Define integer variable i
i = 64/square (4) ;macro call square (4) will substituted by 4 ⚹ 4so the expression becomes i = 64/4 ⚹ 4.

Since/and ⚹ has equal priority the expression will be evaluated as (64/4) ⚹ 4

i.e.. . 16 ⚹ 4 = 64

printf ( “% d” i) ;Print the value of i is 64

Question 182

Edit

Describe in Detail

Essay▾

What is a node class?

Explanation

A node class is a class that has added new services or functionality beyond the services inherited from its base class.

A node class:

  • Relies on the base class for services and implementation,
  • Provides a wider interface to the users than its base class
  • Relies primarily on virtual functions in its public interface
  • Depends on all its direct and indirect base class
  • Can be understood only in the context of the base class
  • Can be used as base for further derivation
  • Can be used to create objects.
Define the Image is Node Class Code

Developed by: