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
// pointer to functions | |
#include <iostream> | |
using namespace std; | |
int addition (int a, int b) | |
{ return (a+b); } | |
int subtraction (int a, int b) | |
{ return (a-b); } |
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
// increaser | |
#include <iostream> | |
using namespace std; | |
void increase (void* data, int psize) | |
{ | |
if ( psize == sizeof(char) ) | |
{ char* pchar; pchar=(char*)data; ++(*pchar); } | |
else if (psize == sizeof(int) ) | |
{ int* pint; pint=(int*)data; ++(*pint); } |
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 <iostream> | |
using namespace std; | |
int main () | |
{ | |
int firstvalue = 5, secondvalue = 15; | |
int * p1, * p2; | |
p1 = &firstvalue; // p1 = address of firstvalue | |
p2 = &secondvalue; // p2 = address of secondvalue |
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<iostream.h> | |
#include<conio.h> | |
#include<string.h> | |
#include<graphics.h> | |
#include<process.h> | |
#include<dos.h> | |
#include<stdio.h> | |
#include<stdlib.h> | |
#include<math.h> | |
//structure declaration |
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 <graphics.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <conio.h> | |
#include <dos.h> | |
#include <iostream.h> | |
#include <fstream.h> | |
#include <string.h> | |
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 <iostream> | |
#include <windows.h> | |
using namespace std; | |
//twinkle twinkle | |
//CC GG AA G | |
//FF EE DD C | |
//GG FF EE D | |
//GG FF EE D | |
//CC GG AA G | |
//FF EE DD C |
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 <iostream> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <fstream> | |
#include <cstring> | |
using namespace std; | |
inline void type_of_word(char f); | |
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<iostream> | |
#include<cstring> | |
#include<cstdlib> | |
#include<iomanip> | |
#include<windows.h> |
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 <windows.h> //header file for windows | |
#include <stdio.h> //C standard library | |
void SetColor(int ForgC); | |
int main() | |
{ | |
SetColor(34); | |
printf("test colour"); | |
return 0; | |
} | |
void SetColor(int ForgC) |
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() | |
{ | |
int n; | |
printf("Enter an integer\n"); | |
scanf("%d",&n); | |
if ( (n/2)*2 == n ) |
OlderNewer