Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Lab 9 v0.5
//gcc 5.4.0 #include <stdio.h> int main(void){ int n=4; int cu=0; int cut=0; int ci=0; int cit=0; char A[4]={'a','b','c','d'}; char B[4]={'c','d','e','f'}; //strlen(A); //strlen(B); char U[30]; char I[30]; for(int i=0;i<=n;i++){ for(int j=0;j<=n;j++){ if(A[i]==B[j]){ I[ci]=A[i]; ci++; printf("ci=%d I[%d]=%c\n",ci,ci,I[cu]); } } } for(int p=0;p<=n;p++){ U[p]=A[p]; cu++; } for(int o=0;o<=n;o++){ U[cu+o]=B[0] } cut=cu-1; //for(int l=0;l<=cut;l++) // printf("U[%d]=%c\n",l,I[l]); cit=ci-1; for(int k=0;k<=cit;k++) printf("I[%d]=%c\n",k,I[k]); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
ele888 lab1 run - graphs
18BCE2182 ASSESS_1 Q1-6
Bool datatype Operation for GCC
Even odd program
array poi
table of 123
Nice1
Strncpy memcpy
Lab6 v1.0 Sin,cos,tan,cot
B_141121_fibonacci
Please log in to post a comment.