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 <iostream> | |
#include <list> | |
#include <forward_list> | |
#include <vector> | |
#include <map> | |
#include <unordered_map> | |
#include <set> | |
#include <deque> | |
#define PRINT(X) std::cout << #X " -> " << sizeof(X) << std::endl; |
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 <iostream> | |
#include <limits> | |
#include <math.h> | |
// x[i]=i++ + 1; | |
int array[5][2] = {{1, 2, 3}, {10, 20, 30}}; | |
int x = array[++i, ++j]; |
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 my_int; | |
float my_float; | |
char my_char; | |
long long my_longlong; | |
struct { char a; long long b; } my_aligned; |
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 <iostream> | |
#include <string> | |
#include <sstream> | |
int main(int argc, char ** argv) | |
{ | |
std::string content; | |
std::stringstream buffer; | |
if (argc > 1) |
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<string> | |
#include<set> | |
#include<iostream> | |
#include<sstream> | |
#include<regex> | |
using namespace std; | |
set<string> get_strings(istream& is, regex pat); |
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 argc, char* argv[]) | |
{ | |
union | |
{ | |
signed short int signed_short_int; | |
unsigned short int unsigned_short_int; | |
struct {unsigned char char1; unsigned char char2;} s; | |
} u; |
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> | |
typedef struct | |
{ | |
int a; | |
char b; | |
int c; | |
char d; | |
} s1; |
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 <iostream> | |
#include <math.h> | |
/* | |
* Complete the function below. | |
*/ | |
int getIntegerComplement(int n) { | |
if(n <= 0) | |
{ |
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 <iostream> | |
#include <vector> | |
#include <queue> | |
#include <list> | |
#include <set> | |
#include <unordered_set> | |
#include <algorithm> | |
using namespace std; |
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 <iostream> | |
#include <iomanip> | |
//using namespace std; | |
void display(double n) | |
{ | |
std::cout << "Flottant : \"" << n << "\" (précision " << std::cout.precision() << ")" << std::endl; | |
} |