A typical memory representation of C program consists of following sections. 1. Text segment 2. Initialized data segment 3. Uninitialized data segment 4. Stack 5. Heap A typical memory layout of a running process 1. Text Segment: A text segment … Continue reading
RCS file: ./alarm.c,v Working file: ./alarm.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: global value for alarm_fired is declared. setting the child process for 5 sec … Continue reading
RCS file: ./ignore_sigint.c,v Working file: ./ignore_sigint.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ignore the signal using SIG_DFL. —————————- revision 1.2 locked by: root; date: 2014/03/11 … Continue reading
RCS file: queues.c,v Working file: queues.c head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: this is the initial version ,here i have completed the push function operation by passing … Continue reading
RCS file: rotate_linked_list.c,v Working file: rotate_linked_list.c head: 1.14 branch: locks: strict root: 1.14 access list: symbolic names: keyword substitution: kv total revisions: 14; selected revisions: 14 description: Code to demonstrate how to rotate the single linked list counter clockwise by … Continue reading
RCS file: generic_double_linkedlist.c,v Working file: generic_double_linkedlist.c head: 1.15 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 15; selected revisions: 15 description: Code to demonstrate how to implement create , insert , display and delete operations in … Continue reading
fork is an operation or a process which creates a copy of itself. It is usually a system call, implemented in the kernel. Fork is the primary method of process creation on Unix-like operating systems. If fork() returns a negative … Continue reading
Time taken to give low input or low voltage plus closing of a switch and the propagation time is known as Bit Recognition Time(BRT).The switch is connected to the Flip Flop,thus input is entered into the flip flop. If threshold … Continue reading
Parameters in C functions A Parameter is the symbolic name for “data” that goes into a function. There are two types of parameters in C: Pass by Value, Pass by Reference. Pass by Value-Pass by Value, means that a … Continue reading
RCS file: linklist.c,v Working file: linklist.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: created linklist inserted nodes at the end inserted nodes at the beginning —————————- … Continue reading
Complicated declarations in C Most of the times declarations are simple to read, but it is hard to read some declarations which involve pointer to functions. For example, consider the following declaration from “signal.h”. void (*bsd_signal(int, void (*)(int)))(int); Let us … Continue reading
RCS file: linklist28_2.c,v Working file: linklist28_2.c head: 1.3 branch: locks: strict root: 1.3 access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: created linklist using functions. created insert at the end of linklist function. —————————- … Continue reading
RCS file: stack.c,v Working file: stack.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: created a stack and implemented push statemnet. —————————- revision 1.2 locked by: root; … Continue reading
RCS file: stack.c,v Working file: stack.c head: 1.4 branch: locks: strict root: 1.4 access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: created stack for 10 elements. save address of stack into stackstart. —————————- revision … Continue reading
RCS file: ./practicesession.c,v Working file: ./practicesession.c head: 1.13 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 13; selected revisions: 13 description: this is the initial file that contain 2 function create_linklist,create_node() and 1 structure named node … Continue reading