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
//Register Storage Class Variable | |
//Speed Test | |
#include<stdio.h> | |
#include<time.h> | |
int main() | |
{ | |
register int i; | |
for(i=1;i<=100000000;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
//Automatic Storage Class Variable | |
//Speed Test | |
#include<stdio.h> | |
#include<time.h> | |
int main() | |
{ | |
auto int i; | |
for(i=1;i<=100000000;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
#include<stdio.h> | |
int i; //external storage class variable | |
void increment(); | |
void decrement(); | |
int main() | |
{ | |
printf("\ni=%d\n",i); | |
increment(); | |
increment(); | |
decrement(); |
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 increment(); | |
int main() | |
{ | |
increment(); | |
increment(); | |
increment(); | |
return 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> | |
int main() | |
{ | |
register int i; | |
for(i=1;i<=10;i++) | |
printf("%d\n",i); | |
return 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> | |
int main() | |
{ | |
auto int i, j; | |
auto int a=1; | |
//Print garbage value (or unpredictable value) | |
printf("%d %d\n", i,j); |
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> | |
//for using bool DataType we used this header file | |
#include<stdbool.h> | |
int main() | |
{ | |
//character | |
char c; | |
unsigned char d; | |
//integer |
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 gcd(int a, int b); | |
void main() | |
{ | |
int a,b; | |
printf("Enter the value of a: "); | |
scanf("%d", &a); | |
printf("Enter the value of 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
#include<stdio.h> | |
#include<math.h> | |
void res(float x1, float y1, float x2, float y2, float x3, float y3, | |
float x, float y, float *area, int *flag); | |
float distance(float x1, float y1, float x2, float y2); | |
float cal_area(float a, float b, float c); | |
int position(float area, float A, float B, float C); | |
void main() | |
{ |
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<math.h> | |
int area(int a, int b, int c); | |
void main() | |
{ | |
int a, b, c; | |
printf("Enter a: "); | |
scanf("%d", &a); | |
printf("Enter b: "); |