EmbLogic's Blog

Category Archives: Uncategorized

Pointers

Pointers are just variables like any other variables we declare, the only difference is that, the so called normal variables store some sort of data like an integer,a character,a floating point number, on the other hand a pointer stores a … Continue reading

Posted in Uncategorized | Leave a comment

creating nodes…

RCS file: ./linklist.c,v Working file: ./linklist.c head: 1.3 branch: locks: strict root: 1.3 access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: declare the header file and also delcare the structure in the head.h file … Continue reading

Posted in Uncategorized | Leave a comment

communication through fifo using one client

RCS file: fifo.c,v Working file: fifo.c head: 1.4 branch: locks: strict root: 1.4 access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: include all the headerfile and also declare the struct in the header.h file … Continue reading

Posted in Uncategorized | Leave a comment

Implemented system call to invoke other processes,which will compile & execute another program respectively…

CS file: systemcall.c,v Working file: systemcall.c head: branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 0 description: in the program,another program is invoked through a program through system call the other program will  convert lower case … Continue reading

Posted in Uncategorized | Leave a comment

Swaping of two number without using third variable.

#include<stdio.h> int main() { int a,b; printf(“enter the value of a &b”); scanf(“%d %d”,&a,&b); printf(“value of a=%d & b=%d\n”,a ,b); a=a+b; b=a-b; a=a-b; printf(“after swaping a=%d &b=%d\n”, a,b); return 0; }

Posted in Uncategorized | Leave a comment

Largest Element Using Function and Array

#include <stdio.h> int largest(int []); int largest(int arr[5]) { int l,i; l = arr[0]; for(i=1;i<5;i++) { if (arr[i] > l) { l = arr[i]; } else ; //printf(“%d”,l); } return l; } int main() { int i, max; int arr[5]; … Continue reading

Posted in Uncategorized | Leave a comment

Addition Using PASS BY VALUE

#include <stdio.h> int add_num(int, int, int);                                              //function declaration int add_num(int num1, int num2, int num3)               //function definition { int num4; num4 = num1 + num2 + num3;                        //function body return num4; } int main() { int i,x,y,z; printf(“Enter three numbers:\n”); … Continue reading

Posted in Uncategorized | Leave a comment

interprocess communication between files by passing fd.

  RCS file: fdtransfer.c,v Working file: fdtransfer.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: implementing communication using files(by passing fd) —————————- revision 1.2 locked by: root; … Continue reading

Posted in Uncategorized | Leave a comment

Enter Elements in Array

#include <stdio.h> int main() { int i,j; int r=2,c=3; int arr[3][4]; printf(“Enter Elements:\n”); for(i=0;i<3;i++) { for(j=0;j<4;j++) { scanf(“%d”, &arr[i][j]); } } printf(“Elements of Array:\n”); for(i=0;i<3;i++) { for(j=0;j<4;j++) { printf(“%d \t”, arr[i][j]); } printf(“\n”); } return 0; } ~ “2d_array.c” 28L, … Continue reading

Posted in Uncategorized | Leave a comment

RCS file: fdtransfer.c,v Working file: fdtransfer.c head: 1.3 branch: locks: strict root: 1.3 access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: initial program. —————————- revision 1.3 locked by: root; date: 2015/03/03 17:24:41; author: root; … Continue reading

Posted in Uncategorized | Leave a comment

implementing ipc by using fork() process\

RCS file: replacing.c,v Working file: replacing.c head: 1.1 branch: locks: strict     emblogic: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: using pid_t command with fork —————————- revision 1.1    locked by: emblogic; date: … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC, Uncategorized | Leave a comment

create pipe and pass a string threw it..

CS file: pipe.c,v Working file: pipe.c head: 1.3 branch: locks: strict root: 1.3 access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: include all the header file declare the varible open a file for rdwr … Continue reading

Posted in Uncategorized | Leave a comment

Program to communicate two processes..

RCS file: c1.c,v Working file: c1.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: Creating pipe for inter process communication given execl call in the child process … Continue reading

Posted in Uncategorized | Leave a comment

Program to communicate two processes

RCS file: c1.c,v Working file: c1.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: Creating pipe for iter process communication given execl call in the child process … Continue reading

Posted in Uncategorized | Leave a comment

Linear Search

1 #include <stdio.h> 2 int flag=1; 3 int main() 4 { 5         int arr[5]; 6         int i, key; 7         printf(“Enter Array:\n”); 8         for(i=0;i<5;i++) 9         { 10                 scanf(“%d”, &arr[i]); 11         } 12         printf(“Elements of array:\n”); 13         for(i=0;i<5;i++) 14         { 15                 printf(“Araray … Continue reading

Posted in Uncategorized | Leave a comment