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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define BLOCK 1024*1024*1024 | |
int main() | |
{ | |
void * p1 = 0; | |
void * p2 = 0; | |
void * p3 = 0; |
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 <string.h> | |
#include <windows.h> | |
long diff_micro(LARGE_INTEGER *start, LARGE_INTEGER *end) | |
{ | |
LARGE_INTEGER Frequency, elapsed; | |
QueryPerformanceFrequency(&Frequency); | |
elapsed.QuadPart = end->QuadPart - start->QuadPart; |
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> | |
#define BUFFER_SIZE 100 | |
int main() | |
{ | |
char * font = "Myriad Pro"; | |
int size = 32; | |
char * message = "Hello world"; | |
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> | |
int main() | |
{ | |
printf("****************************************************\n"); | |
printf("\n"); | |
printf("64-bit Decimal : %I64d\n", 111222333444); | |
printf("64-bit Hexadecimal: %I64x\n", 111222333444); | |
printf("64-bit Hex Big : %I64X\n", 111222333444); | |
printf("64-bit Hex 2 : 0x%I64X\n", 111222333444); |
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> /* for malloc function */ | |
#include <string.h> /* memcpy */ | |
int main() | |
{ | |
void *p = malloc(4); /* 4 bytes requested */ | |
if(!p) | |
{ |
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> | |
/******************************************** | |
* Function : MinMax * | |
* Input parameters : *begin, *end * | |
* Output parameters: **smallest, **largest * | |
********************************************/ | |
int minMax(int * begin, | |
int * end, | |
int ** smallest, |
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> | |
int getStringLength1(char array[]) | |
{ | |
if(array) | |
{ | |
int length = 0; | |
for(char *p = array; *p != 0; ++p) | |
{ | |
++length; |
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> | |
void Print(int * begin, int * end) | |
{ | |
for(; begin != end; ++begin) | |
{ | |
printf("%d\n", *begin); | |
} | |
} |
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> | |
int main() | |
{ | |
/* a simple integer */ | |
int i = 1234; | |
/* a pointer to an integer */ | |
int * p = 0; | |
p = &i; |
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
// Const.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <iostream> | |
using namespace std; | |
class Person | |
{ | |
private: |