altele Flashcards

(3 cards)

1
Q

char s[10] = “AB6X92P3M”, b[10];
int j = 0, k = 0;
while (s[j]) {
if (j % 2)
b[k++] = s[j++];
}
b[k] = 0;
puts(b);

A

BX23

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

char a[10], b[10];
int k; //(1)
scanf(“%s %s”, a, b); //(2)
k = (strlen(a)/2) + (strlen(a) < strlen(b)); //(3)
a[k] = ‘\0’; //(4)
printf(“%d”, strlen(a) < strlen(b)); //(5)
b = a; //(6)

A

b=a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly