Monday, 25 September 2017
Compilation Process c Language
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
Sunday, 24 September 2017
Sum of series using recursion
Q : Define recursion. Write a complete program to evaluate the given series using recursive function sum( ). Here n is user dependent.
1 + 2 + 3 +…+ n
Solution :
As we C language is known as
building block of functions. This means everything in c language is achieved
through a function. In C language there is not any restriction to call a
function you can call a function from anywhere No matter of scope.
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
Friday, 22 September 2017
File Open close
Q : How to create a file in C? Why should a user close the file?
Answer :
For create a file in language,stdio.h header file has fopen
method which takes two arguments and return base address of opening file.
Suntax
Return_address fopen(“file
name”,”Open mode”);
Open mode indicate file opening option whether a file is
open for read, write, append or both.
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
Wednesday, 20 September 2017
Single link list upto 20 number
Q : Write a program to create a link list. There should be 20 nodes in the list, each node contains an integer between 1-20. The list should be printed at the end.
Solution :
#include<stdio.h>
typedef struct nlist
{
int data;
struct nlist *next;
}node;
node *start=NULL;
node* create(int);
void add(int);
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
Subscribe to:
Posts (Atom)