Category: 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”);…
Auto Example: #include<stdio.h> void main() { Display(); Display(); Display(); } void Display(){ auto int x=1; x=x+5; printf(“%d\n”,x);…
It will clear the confusion about the pointer when arises. Sum clear: example code: #include<stdio.h> int main()…
Google Search: https://www.google.com/search?q=Counting+2s&ie=utf-8&oe=utf-8&client=firefox-b#q=Counting+2s+in+c SOlution: https://www.careercup.com/question?id=56794 //https://www.careercup.com/question?id=56794 #include<stdio.h> int main() { int n,i,j; int ctr=0; scanf(“%d”,&n); for(i=0;i<=n;i++) { for(j=i;j>0;j=j/10) {…
code: //program to cound frequency of digits in a number #include<stdio.h> #define BASE 10 int main() {…
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;…
Recent Comments