Actividad de Bienvenida. Programación II
jaorduz
5,732 views
Contents
This sections contains some questions about fundamental concepts about programming.
Data type
a. Consider the type: int, float and...
b. Choose the correct answer.
c. Some keywords
c. Examples of escape secuences
Code/Scripts
- Fix the next code to get the size of a.
1
2
3
4
5
6
7
8
9
10
11
12
#include<stdio.h>
int main(){
int a = 2;
b =sizeof(a);
printf("salida %i. El tamanio es: %i Bytes\n" a, b)
return 0;
}
- Repair the follow code to get the values and size of A and a.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
int main(){
int A, a;
A = 2
a = 3;
printf("A=\n", A);
printf("a=%i\n", a);
return 0;
}
- Organize the code in the correct form:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
return 0;
{
bool isEven = true;
int main()
if(p==2)
else{
printf("p=%i es Impar %i\n",p ,isEven);
{
printf("p=%i es Par %i\n",p ,isEven);
}
}
int p=3;
#include <stdbool.h>
puts("1 = true and 0 = false\n\n");
}
- Arrange the code in the correct form:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Biblioteca
// Declaracion de la funcion
void func(void);
// Definicion de la funcion funcion principal
int main(){
while(count--) {
}
return 0;
func(); // llamar la funcion
static int count = 5; // variable global
}
// Definicion de la funcion
printf("i es %d y la cuenta es %d\n", i, count);
register int i = 5; //variable local register(static)
void func( void ) {
i++;
}
#include <stdio.h>
Go Up
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.