Program for Cyclic Redundency Check

Saturday, September 19th, 2009  »  Posted By Ranjith  »  Total 0 Comment

INPUT:
enter frame :
1 1 1 1 1 1 1 1
enter generator :
1 1 0 1

OUTPUT:
frame received correctly

Program for character stuffing

Saturday, September 19th, 2009  »  Posted By Ranjith  »  Total 6 Comments

INPUT:
enter string:
asdlefgh
enter position: 8
invalid position,enter again: 3
enter the character: k

OUTPUT:
frame after stuffing:
dlestx as dle k dle dle dlefgh dleetx

Program for Bit Stuffing

Friday, September 18th, 2009  »  Posted By Ranjith  »  Total 6 Comments

Enter frame length: 10

Enter input frame (0′s & 1′s only):
1 0 1 0 1 1 1 1 1 1

After stuffing the frame is:
1 0 1 0 1 1 1 1 1 0 1

To reverse the given string using pointer

To reverse the given string using pointer Thursday, December 4th, 2008  »  Posted By Ranjith  »  Total 4 Comments

This is the program to reverse the given string and display. The program internally uses the logic of reversing the word. Logic: The approach here is to reverse the string using the pointers. Reversing the string includes the reversing the each and every words in it. After accepting a string from user, it calls a [...]

To reverse the given string

Thursday, December 4th, 2008  »  Posted By Ranjith  »  Total 0 Comment

Here is the program to reverse the given string and display. The program internally uses the logic of reversing the word. Logic: Reversing the string includes the reversing the each and every words in it. After accepting a string from user, it calls a function “strev” with two string arguments, the source and destination. It [...]

To copy the contents of one string to another string using pointer

Thursday, December 4th, 2008  »  Posted By Ranjith  »  Total 8 Comments

This is the simple implementation of the “Copy” function using the pointers. This program copies the content of one string to another. Logic : The program asks the user to input the string to copy and stores using the pointer str1. The inner function “stcpy” takes 2 string pointers as arguments. By keeping the length [...]

To copy the contents of one string to another string

Thursday, December 4th, 2008  »  Posted By Ranjith  »  Total 1 Comment

This is the simple implementation of the “Copy” function of the computer world. This program copies the content of one string to another. Logic : The program asks the user to input the string to copy and stores this as str1. The inner function “stcpy” takes 2 strings as arguments. By keeping the length as [...]

To check whether the given string is palindrome-method 2

Thursday, December 4th, 2008  »  Posted By Ranjith  »  Total 13 Comments

Here is  another program, advanced version of the previous program, to check if the entered string is a palindrome. Palindrome is a string segment, which reads same from both the directions. The same method is implemented here in the program also. Logic :  The given string is referred by two names, where one is traced [...]

To check whether the given string is palindrome-method 1

Thursday, December 4th, 2008  »  Posted By Ranjith  »  Total 2 Comments

Here is  the program to check if the entered string is a palindrome or not. As we have seen in the earlier cases, Palindrome is a string segment, which reads same from both the directions. The same method is implemented here in the program also. Logic :  The given string is reversed using a method, [...]

To replace a word by another word in a given string

Thursday, December 4th, 2008  »  Posted By Ranjith  »  Total 4 Comments

#include<stdio.h> #include<conio.h> int stlen(char str[50]) { int len = 0; while(str[len]!=’\0′) len++; len–; return len; }

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup