This file contains hidden or 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> | |
int main() { | |
int inc = 0, dec = 0; | |
// incrementing a number | |
printf("inc = %d\n", inc); | |
inc++; | |
printf("inc (po inc++ operacijos) = %d\n", inc); | |
This file contains hidden or 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 hidden or 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 hidden or 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
@interface ViewControllerStudentsList () | |
@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext; | |
@property (strong, nonatomic) UIManagedDocument *document; | |
@property (nonatomic) NSInteger studentCount; | |
@property (strong, nonatomic) NSMutableArray *studentList; | |
@property (strong, nonatomic) NSMutableDictionary *studentPortraits; | |
@end |
This file contains hidden or 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> | |
#define NROWS 10 | |
#define NCOLS 7 | |
float col_ave(int x[NROWS][NCOLS], int col) { | |
float average; | |
int i, total = 0; | |
for (i = 0; i < NROWS; i++) { |
This file contains hidden or 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 *first, // Allocates a pointer to int | |
a; // Allocates an int | |
for ( a = 0; // Initializes a to 0 | |
a < 10; | |
a++ // Increments a value by 1 | |
) { | |
first[a] = 5; | |
} |
This file contains hidden or 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 |
This file contains hidden or 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 <math.h> | |
unsigned intToBinaryInt(unsigned k, int *components, int counter) { | |
// k - current binary component | |
// components - collection of all the components | |
// counter - tracks how many components are there | |
if (k == 0) { | |
components[counter] = k; |
This file contains hidden or 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 <limits.h> | |
#include <stdio.h> | |
int main(void) { | |
int value = -1; | |
printf("UINT_MAX: %u\n", UINT_MAX); | |
printf("value: %d\n", value); |
This file contains hidden or 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 <stdlib.h> | |
#include <stdio.h> | |
struct Point { | |
int x; | |
int y; | |
int z; | |
}; | |
struct Segment { |