Sunday, 9 October 2016

NIELIT Assignment 3 : Basics of Os, Unix and Shell Programming

Assignment 3.

a) Convert the decimal number 192 to octal and hexadecimal using bc command.

b) Run ps , the script command and run ps again . What is its output. Explain

NIELIT Assignment 2 : Basics of Os, Unix and Shell Programming

Assignment 2.

a) Explore the filesystem tree using cd, ls, pwd and cat. Look in /bin, /usr/bin, /sbin, /tmp and /boot. What do you see?.

b) Explore /dev. Can you identify what devices are available? Which are character-oriented and which are block-oriented? Can you identify your tty (terminal) device (typing who am i might help); who is the owner of your tty

NIELIT Assignment 1: Basics of Os, Unix and Shell Programming

Assignment 1.

Try the following command sequence and write its output:
cd ; pwd ;ls -al ; cd . ;pwd (where did that get you?) ; cd .. ;pwd ; ls -al ; cd .. ; pwd;ls -al ;cd

UGC Net Computer Science Paper 3 July-16 Page 5

41. Which of the following statements is not correct ?
(1) HTML is not screen precise formatting language.
(2) HTML does not specify a logic.
(3) DHTML is used for developing highly interactive web pages.
(4) HTML is a programming language.

Answer D
Expiation : No, HTML is not a programming language. The "M" stands for "Markup". Generally, a programming language allows you to describe some sort of process of doing something, whereas HTML is a way of adding context and structure to text.

42. When one object reference variable is assigned to another object reference variable then
(1) a copy of the object is created.
(2) a copy of the reference is created.
(3) a copy of the reference is not created.
(4) it is illegal to assign one object reference variable to another object reference
variable.

Answer : B
Explanation : A reference variable in C++ is an alternate name/alias of a variable/object, which must be initialized at the declaration time. One a reference variable has been assign an object address then it became an alias of that object so any change from reference variable will affect original object data. So we can say that a reference variable is a copy of refer variable/object.

class test
{
     int i;
     public:
     test()
     {
          i=0;
     }
     void change()
     {
          i++;
     }
     void print()
     {
          cout<<endl<<i;
     }
};
void main()
{
     test ob1;
     test &ob2=ob1;
     ob1.change();
     ob2.print();
     ob1.change();
     ob2.print();

}