Tag Archives: C++

Different methods of swapping 2 numbers

#include<stdio.h> void swap(int *,int *); int main() { int temp; int *t; int a=100,b=200; //Using 3 variables //1.1 temp = a; a = b; b = temp; printf(“%d %d\n”,a,b); //1.2 swap(&a,&b); printf(“%d %d\n”,a,b); //Using 2 variables //2.1 a += b; … Continue reading

Posted in Data Structures with C | Tagged , , , , | Leave a comment

Errors in “Hello World” program

#include<stdio.h> int main() { printf(“Hello World”); return 0; } /* Errors Line 1 :- *1. If u remove only preprocessor (#)->error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token *2.#nclude<stdio.h> ->  error: invalid preprocessing directive #nclude *3. #include … Continue reading

Posted in Data Structures with C | Tagged , , , , , , | Leave a comment

Client Server communication in IPC using FIFO for 3 clients

Logfile of Project ——————————– ——————————– RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: It includes basic headerfiles for FIFOs. It contains … Continue reading

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

Client Server Communication using FIFO for single server and a client when result FIFO created by client

Logfile of Project ———————————— ———————————— RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: It contains basic header files for communication using … Continue reading

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

IPC using Pipes for single user

RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: stdio.h , fcntl.h, unistd.h, sys/types.h are included. —————————- revision 1.2    locked by: root; … Continue reading

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

Quick Sort using recursion

//Quick sorting using Recursion #include<stdio.h> #include<stdlib.h> //Prototypes of functions used int * input(int *,int); int * sort(int *,int); void display(int*,int); int main() { int *a,n; printf(“Enter number of numbers you want to sort?\n”); scanf(“%d”,&n); a = input(a,n); a = sort(a,n);//call … Continue reading

Posted in Data Structures with C | Tagged , , , , | Leave a comment

Bubble sorting using recursion

#include<stdio.h> #include<stdlib.h> int * input(int *,int); int * sort(int *,int); void display(int*,int); int main() { int *a,n,i,j,c,temp; printf(“Enter number of numbers you want to sort?\n”); scanf(“%d”,&n); a = input(a,n); a = sort(a,n); display(a,n); } int * input(int *a,int n) { … Continue reading

Posted in Data Structures with C | Tagged , , , , | Leave a comment

multiple data decompression for codelength 4

RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: All required headers are included. —————————- revision 1.1    locked by: root; date: 2015/07/08 … Continue reading

Posted in Data Structures with C | Tagged , , , | Leave a comment

C++ : simple program in linux.

RCS file: ./simple.cpp,v Working file: ./simple.cpp head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: printing “My name is Ruchi”using string mystring —————————- revision 1.1 date: 2014/06/06 12:46:39; author: root; … Continue reading

Posted in Uncategorized | Tagged | Leave a comment