Preprocessor Directives in c

May 14, 2021 0 Comments

 Preprocessor Directives in c, pre-processor instruction call as ‘directives’, directives always start with ‘#’ 1. Macro:  Macros are symbolic names give to a constant. At the stage of Preprocessor, macros replace with their definitions. There are two types of Macros. Syntax: #define MACRO_NAME Definition 1. object-like macros: The object-like macros look like a constant. They …

Share This:

Memory Segments in C

May 10, 2021 0 Comments

Memory Segments in C, There are different types of memory segments in the userspace. 1. Text segment:  text segment will store all the instructions which are part of the program. 2. Stack:  stack segment is used to store all local variables and is used for passing arguments to the functions along with the return address of …

Share This:

Storage classes in C (Auto, Register, Static, Extern)

May 10, 2021 0 Comments

Storage classes in C, There are four different storage classes 1. auto:  This is the default storage class for all local variables.             int a;             auto int b; the above are both variables in the same storage class.            example.c     2. register:  The register storage …

Share This:

How to Create a Library in C

May 9, 2021 0 Comments

How to Create a Library in C, Executables can be created in two ways 1. Static:  They contain fully resolve library functions that physically link to the executable images during building. creating static libraries: 1. Implement library source files. 2. compile and generate relocatable files. gcc add.c -o add.o gcc sub.c -o sub.o 3. use …

Share This:

C Program Compilation Stages

May 9, 2021 0 Comments

C Program Compilation Stages, There are 4 stages of the compilation process. 1. pre-processor:  C Program Compilation Stages, The job of the pre-processor is to take source files as input and pre-processor file example.i produced. If we go through the example.i file we will notice that stdio.h header file will be replaced with its full code.    …

Share This:

Linux System programming interview question and Answers

May 8, 2021 0 Comments

Linux System programming interview question and Answers 1. What is the use of system command? Ans: The System()  command is used to execute a shell command. 2. How to switch and access user mode to kernel mode? Ans: user application can’t access kernel space directly and similarly kernel code can’t access the userspace. user and kernel space can …

Share This:

C Interview question and answers

May 8, 2021 0 Comments

C Interview question and answers 1. What are the memory segments in C? Ans: There are different types of memory segments in userspace.     1. Text segment: text segment will store all the instructions which are part of the program.     2. Stack: stack segment is used to store all local variables and is used for …

Share This:

Networking Interview Questions

May 7, 2021 0 Comments

Networking Interview Questions 1. Difference between hub, bridge, switch, and router? 2. What is SNMP protocol? 3. what is the SNMP Header and size of the header? 4. Difference between SNMPv1, SNMPv2, and SNMPv3? 5. What are the OSI layers? 6. What are the TCP/IP layer? 7. Differences between TCP and UPD? 8. What is the …

Share This: