Category: C Refresh

03
May
2017

Pointer Clear

code: #include<stdio.h> int main() { int* pc; int c; c=22; printf(“____\n”); printf(“Address of c:%u\n”,&c); printf(“Value of C:%d\n”,c);…

29
Apr
2017

File Handling in C

Fgets Code: #include<stdio.h> int main() { FILE *fp; fp=fopen(“a.txt”,”r”); //apend mode if(fp==NULL) { printf(“unable to open file\n”);…

28
Apr
2017

Storage Class Specifier: IN C

Auto Example: #include<stdio.h> void main() { Display(); Display(); Display(); } void Display(){ auto int x=1; x=x+5; printf(“%d\n”,x);…

28
Apr
2017

Pointer Good Basic

It will clear the confusion about the pointer when arises. Sum clear: example code: #include<stdio.h> int main()…

20
Apr
2017

Frequency of Digit in A Number

code: //program to cound frequency of digits in a number #include<stdio.h> #define BASE 10 int main() {…

20
Apr
2017

Logic to Find First and Last Digit

Last Digit: #include<stdio.h> int main(){ int num,lastdigit; printf(“enter any number:”); scanf(“%d”,&num); lastdigit=num%10; printf(“lastdigit = %d”,lastdigit); return 0;…