Lab 3
Lab 3
Lab 3
h>
#include <string.h>
int main() {
int vi = 0, ci = 0;
if (arr[i] == 'a' || arr[i] == 'e' || arr[i] == 'i' || arr[i] == 'o' || arr[i] == 'u' ||
arr[i] == 'A' || arr[i] == 'E' || arr[i] == 'I' || arr[i] == 'O' || arr[i] == 'U') {
vowels[vi++] = arr[i];
consonants[ci++] = arr[i];
vowels[vi] = '\0';
consonants[ci] = '\0';
puts(vowels);
puts(consonants);
return 0;
---------------------------------------------------
#include <stdio.h>
#include <string.h>
int main() {
char arr3[11];
int j=0;
arr3[j] = arr1[i];
j++;
arr3[j] = arr2[i];
j++;
arr3[j] = '\0';
puts(arr3);
return 0;
----------------------------------------
#include <stdio.h>
#include <string.h>
int main() {
printf("Reversed: ");
printf("%c", input[i]);
return 0;
----------------------------------------------------
#include <stdio.h>
int main() {
char string1[10];
char string2[10];
char string3[30];
gets(string1);
gets(string2);
int i = 0, j = 0;
string3[i] = string1[i];
i++;
string3[i + j] = string2[j];
j++;
string3[i + j] = '\0';
printf("Output= ");
puts(string3);
return 0;
----------------------------------------------------
#include <stdio.h>
int main() {
int hi = 0, li = 0;
hv = arr[i];
hi = i;
lv = arr[i];
li = i;
return 0;
---------------------------------
#include <stdio.h>
int main() {
char arr2[50];
int i = 0, j = 0;
arr2[j] = arr1[i];
j++;
i++;
arr2[j] = '\0';
return 0;
---------------------------------------------
#include <stdio.h>
int main() {
int i, ci = 0, si = 0;
c[ci++] = str[i];
s[si++] = str[i];
c[ci] = '\0';
s[si] = '\0';
return 0;