Sunteți pe pagina 1din 2

[Título del documento]

DATA STRUCTURE
TEST 1
e(--n);
Consider the following program: printf("%d ", n);
e(--n);
(45 pts) }
}
#include <stdio.h>

int counter(int i)
What is the output of this program?
{
static int count = 0; A. 0120
count = count + i;
return count; B. 0121
} C. 1201
int main(void) D. 0211
{
int i, j;
Consider the following program:
for (i = 0; i <= 5; i++)
j = counter(i); #include <stdio.h>
printf("%d\n", j); int main(void)
return 0; {
} int a[][3] = {1, 2, 3, 4, 5,
6};
int (*ptr)[3] = a;
What is the output of this program?
printf("%d %d ", (*ptr)[1],
(*ptr)[2]);
A. 10
B. 15 ++ptr;
printf("%d %d\n", (*ptr)[1],
C. 6 (*ptr)[2]);
D. 7
return 0;
}
Consider the following program:
#include <stdio.h>
What is the output of this program?
void e(int); A. 2356
int main(void) B. 2345
{ C. 4500
int a = 3;
e(a); D. none of the above
putchar('\n');
return 0;
}

void e(int n)
{
if (n > 0)
{

pág. 1 Ing. María de los Ángeles Morales


[Título del documento]

II. Anser the question in the scheduled exercise (25 pts)

https://www.daypo.com/lista-pilas-colas.html
Write the score: / 25

III. Write a Vocal logic function that determines if a character is a vowel


(30 pts)

pág. 2 Ing. María de los Ángeles Morales

S-ar putea să vă placă și