This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Get (struct KNYGA a[], int *i) | |
{ | |
int t; | |
for(t=0; t<*i; t++) | |
{ | |
strcpy(a[t].pavadinimas, a[t+1].pavadinimas); | |
strcpy(a[t].autorius, a[t+1].autorius); | |
a[t].puslapiu = a[t+1].puslapiu; | |
a[t].metai = a[t+1].metai; | |
a[t].versta = a[t+1].versta; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <conio.h> | |
typedef int bool; | |
#define true 1 | |
#define false 0 | |
typedef struct{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <conio.h> | |
typedef int bool; | |
#define true 1 | |
#define false 0 | |
typedef struct{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int data[4], // Allocates an array of type int with 4 elements | |
i; // Allocates an int | |
for(i = -8; // Initializes i to -8 | |
i < 10; | |
i++) // Increments i by 1 | |
printf("%d\n", data[i]);// This will generate an error when i is in [-8, 0)u(3, 9] | |
// This ^ will iterate over the following values | |
// -8 |