Category: Programming

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()…

22
Apr
2017

Mission laravel: Installation

laravel installation: composer create-project –prefer-dist laravel/laravel yourproject name 5.4.19 example for me: composer create-project –prefer-dist laravel/laravel cms…

22
Apr
2017

PHP OOP Project

Basic Simple Project By Me: <?php class Employee { var $first; var $last; var $stat; var $uid;…

21
Apr
2017

Count number of 2’s in a given range (0 to n)? (ex: range between 0-20, Ans: 3 (i.e [2], 1[2], [2]0))

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) {…