Deftouch Interactive Interview Questions

MCQ

a)#include<stdio.h>

  #define float int

  struct {

  float i:1;

  char ch;

  }response;

  int main(){

  printf("Memory occupied by struct response is %u\n",sizeof(response));

   return 0;

   }

b)#include<stdio.h>

   int main(){

   int * const p;

   int i=5;

   p=&i;

   printf(“%d\n”,*p+2);

   return 0;

   }

c)#include<stdio.h>

    int main()

   {

   printf("%u\n”, sizeof(void));

    return 0;

   }

d)#include<stdio.h>

   int main()

  {

   int i[3] = {'\0', '\0'};

   int j[3] = {'\0', '\0'};

   int k = i[1] + j[0];

   printf("%d\n",k);

   return 0;

   }


C

1)What are the differences between dangling and null pointers?



Linux

1)What is the output redirection? Give an example. (Assume filename test file)

2)What is raise(signum int) used for?

3)Write any two commands which display running processes in Linux?

4)Write a command to delete the whole directory recursively?

5)Write any two commands to check memory usage in Linux?

6)Explain the use of nice command in Linux? What is its range?

7)Write a command to find the status of a process

8)Write any two commands to download a file from the internet?

9)Write a command to display the network interface configuration in Linux?

10)Write a command to display current system status, including each user activity?

11)Write a command to change the owner of a file or directory?

12)Write a command to display file system disk space usage?

13)Write a command to bring a job to foreground?

14)ping command uses which protocol?

15)Write a command to display the last 10 lines of a file (filename test file)

16)What are the protocols used in sending (outgoing) emails and accessing emails?

17)Write a command to display the first 100 lines of a file (filename test file)?

18)Write the name of the command to replace selected text in a file without opening the file.

19)Write the name of the process who has pid as 0 and pid as 1 in Linux?

20)What command is used to count the total number of lines, words, and characters 

       contained in a file?

21)Write a command to display Linux kernel logs.

TCP/IP

1)Write default port numbers of ssh and https?

2)Define system reserved ports and mention the range of system reserved ports?

3)Write the address range of class A IP-address?

4)What protocol is used to find the hardware address of a local device?