• void main()
• {
• char c[20];
• int a1[20];
• int a2[20];
• int n=0;
• int k=0;
• printf("\nPlease Enter the key value: ");
• scanf("%d",&k);
• int i;
• printf("\n Please enter a word to be encoded:");
• for(i=-1;i<n;++i)
• {
• scanf("%c",&c[i]);
• }
• int temp=0;
• int j=0;
• int count=0;
• for(i=0;i<=n;++i)
• {
• l1:temp=(int)c[i];
• if(c[i]==' ')
• {
• i=i+1;
• count=count+1;
• goto l1;
• }
• a2[j]=(a1[j]+k)%26;
• ++j;
• }
• n=n-count;
• printf("\nThe encoded cipher is: ");
• char c2[20];
• for(i=0;i<n;++i)
• {
• c2[i]=(char)(a2[i]+97);
• printf("%c",c2[i]);
• }
• printf("\n\nDecoding it receiver side ");
• int a3[20];
• for(i=0;i<n;++i)
• a3[i]=(int)(c2[i]-97);
• for(i=0;i<n;++i)
• {
• if(a3[i]>=k)
• a3[i]=a3[i]-k;
• else
• a3[i]=a3[i]-15+26;
• }
• }
• /*OUTPUT