Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Contents
This sections contains some questions about fundamental concepts about programming.
Data type
a. Consider the type: int, float and...
What are the other types?
b. Choose the correct answer.
A script/program/code/source-file is ...
c. Some keywords
in C are...
c. Examples of escape secuences
in C are...
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;
}
Enter to Rename, Shift+Enter to Preview
- 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;
}
Enter to Rename, Shift+Enter to Preview
- 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");
}
Enter to Rename, Shift+Enter to Preview
- 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>
Enter to Rename, Shift+Enter to Preview
Go Up
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content