answersLogoWhite

0


Best Answer

#include<stdio.h> #include<conio.h>

int binary(int);

void parity(int [],int []);

int arr[8],arr1[8],parityarr[8];

char chr;

int go,temp,temp1,i;

void main()

{ char chr1;

clrscr();

go=0;

Sender:

if(go==0)

printf("Enter Data : \n");

printf("\nEnter a character : ");

scanf("%c %c",&chr,&chr1);

temp=chr;

binary(temp);

printf("\n\nAscii value is : %d\n",temp);

printf("\nBinary Form : ");

for(i=7;i>=0;i--)

{

arr1[i]=arr[i];

printf("%d ",arr[i]);

}

printf("\n");

temp1=chr1;

binary(temp1);

printf("\n\nAscii value is : %d\n",temp1);

printf("\nBinary Form : ");

for(i=7;i>=0;i--)

{

printf("%d ",arr[i]);

}

parity(arr,arr1);

for(i=7;i>=0;i--)

{

arr[i]=0;

arr1[i]=0;

}

getch();

}

void parity(int arr[],int arr1[])

{

printf("Receiver Side :\n");

printf("\n\nLRC :\n");

for(i=7;i>=0;i--)

{

printf("%d ",arr[i]);

}

printf("\n");

for(i=7;i>=0;i--)

{

printf("%d ",arr1[i]);

}

printf("\n---------------------\n");

for(i=0;i<8;i++)

{

if(arr[i]==0 && arr1[i]==0 arr[i]==1 && arr1[i]==1)

{

parityarr[i]=0;

}

else if(arr[i]==1 && arr1[i]==0 arr[i]==0 && arr1[i]==1)

{

parityarr[i]=1;

}

}

for(i=7;i>=0;i--)

{

printf("%d ",parityarr[i]);

}

}

int binary(int x)

{

int rem;

int ctr=0,i=1;

do

{

rem=x%2;

arr[i]=rem;

if(rem==1)

{

ctr++;

}

x=x/2;

i++;

}

while(x!=0);

if(ctr%2==0)

{

arr[0]=0;

}

else

{

arr[0]=1;

}

return(0);

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Source in C for longitudinal redundancy check?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Physics

What kind of wave is sound wave?

Mechanical WaveLongitudinal WavePressure Wavesound wave is a longitudinal mechanical wave.answer: B. compression C. longitudinal D. mechanical


What is the Doppler shift equation?

Percentage(%)=(C+Vr)\(C+Vs) C is the velocity of waves in the medium; Vr is the velocity of the receiver relative to the medium; positive if the receiver is moving towards the source (and negative in the other direction); Vs is the velocity of the source relative to the medium; positive if the source is moving away from the receiver (and negative in the other direction).


Sound from source A has a frequency twice as great as the frequency of sound from source B compare the wavelengths of sound from two sources?

The formula goes: c = lambda times f where c is the speed in the medium (air) in meters per second lambdathe wavelength in meters and f the frequency in Hz. If the frequency is doubled, the wavelength will be halved.


Can anyone give definition for Doppler frequency?

It is not Doppler frequency. It's Doppler effect. The APPARENT change in the frequency of the source as there is a relative motion between the source and the observer is defined as Doppler effect. The expression for frequency (apparent) is given fapparent = [(C - Vo + Vm)/(C-Vs+Vm)] x freal The condition to be kept in mind is that the source is on the left side and the observer on the right side along positive X axis. Vm - velocity of the medium and the medium is moving along positive X axis. Vo - the velocity of the observer Vs - the velocity of the source C - velocity of the wave either sound or light But in case of light Vm is not needed as the medium movement will not affect the velocity of the wave in any way.


In Einsteins equation Emc squared what does the c stand for?

In Einstein's equation, E=mc², the &quot;c&quot; stands for the speed of light in a vacuum, which is approximately 299,792,458 meters per second (m/s).

Related questions

What is the Source code for longitudinal redundancy check in C language?

It depends on the language you want to use. Here is a VB example:http://bytes.com/topic/visual-basic-net/answers/443023-lrc-calculation-algorithm


What source would provide synonyms for the word humor in order to avoid redundancy in writing?

A thesaurus.


What are sound waves A Standing wave B Transverse wave C Longitudinal wave?

Longitudinal (also called compression) wave


What has the author C Van de Kreeke written?

C. Van de Kreeke has written: 'The interference of the model support mast with measurements of the longitudinal and lateral aerodynamic coefficients' -- subject(s): Lateral Stability of airplanes, Longitudinal Stability of airplanes, Stability of airplanes, Lateral, Stability of airplanes, Longitudinal


What is the use of function in c?

using function we can call the function in the program any where. by using functions we can reduce the code redundancy


What is the differentiate of turbo c from turbo c plus plus?

Turbo C compiles c source. turbo c++ compiles c++ source code.


Can you give me the source code of sales in c language?

You can check various open source sites (SourceForge, etc.) to see if anyone has a program relating to sales, but if it is a proprietary (for sale) program you won't get the source code unless you pay for the source code license.


Getting source code of c?

C is a programming language, so it doesn't have source code.(On the other hand, C compilers do have source code, but you, as a beginner in programming, could not understand them.)


What is the least accurate description of relational databases Choose one answer a They minimize redundancy in data b They are made up of multiple tables c They maintain?

c They maintain hierarchical data structures. This statement is inaccurate because relational databases follow a tabular structure, not a hierarchical one.


What is the source code for scientific calculator in c?

What is the source code for scientific calculator in c?Read more: What_is_the_source_code_for_scientific_calculator_in_c


What is built-in redundancy?

redundancy means back up so a built in redundancy in a computer is like a 2nd C: drive in case the first fails it can be switched instantly, also a 2nd power supply to minimize downtime. in a factory this could mean having 2 sets of control boards inside a machine so if one breaks down the other can be used while the broken one is repaired or replaced.


How do you Open a text file as C plus plus source code?

All C++ source code is is a text file with the .cpp extension. So if you save your code as *****.cpp then it is automatically C++ source code.