Initial commit

This commit is contained in:
2023-05-22 23:28:51 -03:00
commit 5c1403aa91
467 changed files with 18649 additions and 0 deletions

Binary file not shown.

BIN
ForNextDay/Lec2/Lec2src.zip Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,9 @@
// first.c
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char * * argv)
{
int a = 65;
printf("d = %d, 4d = %4d, x = %x, o = %o, c = %c\n", a, a, a, a, (char)a);
return EXIT_SUCCESS;
}

Binary file not shown.

View File

@ -0,0 +1,50 @@
// first.c
#include <stdio.h>
#include <stdlib.h>
#define MAX 256
#define PUSH 1
#define POP 0
#define LIST 2
int main(int argc, char* argv[])
{
int stack[MAX];
int size = 0;
int val;
int iChoice;
int iNRead;
/* Processing loop */
printf("Choice (1=add, 0=remove, 2=list): ");
iNRead = scanf("%d", &iChoice);
while(iNRead == 1)
{
switch(iChoice)
{
case PUSH:
printf("Value to add: ");
scanf("%d", &val);
if (size < MAX) {
stack[size] = val;
size++;
}
break;
case POP:
// Print out the last element and remove it.
if(size > 0) {
size--;
val = stack[size];
printf("Element: %d Value: %d\n", size, val);
}
break;
case LIST:
// Print out the stack elements
for(int i = 0; i < size; i++) {
printf("Element %d: %d\n", i, stack[i]);
}
break;
}
printf("Choice (1=add, 0=remove, 2=list): ");
iNRead = scanf("%d", &iChoice);
}
return EXIT_SUCCESS;
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char ** argv) {
char ch = 'a';
int interger = 10;
float fl = 10.0;
double doub = 25.2525;
int a = sizeof(ch);
int b = sizeof(interger);
int c = sizeof(fl);
int d = sizeof(doub);
printf("char = %d, int = %d, float = %d, double = %d\n", a, b, c, d);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.