Opening Ceremony

Bhim Higher Secondary School Suntopar, Dolakha

Opening Ceremony

Bhim Higher Secondary School Suntopar, Dolakha

JCT Students (First Batch(2069-2070))

Bhim Higher Secondary School Suntopar, Dolakha

Opening Ceremony

Bhim Higher Secondary School Suntopar, Dolakha

Opening Ceremony

Bhim Higher Secondary School Suntopar, Dolakha

Showing posts with label C Language. Show all posts
Showing posts with label C Language. Show all posts

Sunday, July 31, 2016

Program in C to find the factorial of a given number


/* Program to find the factorial of a given number */
#include<stdio.h>
#include<conio.h>
void main()
{
    int i, num, fact = 1;

  printf("\n Enter a number to calculate it's factorial : ");
  scanf("%d", &num);

  for (i = 1; i <= num; i++)
    fact = fact * i;

  printf(" Factorial of %d = %d\n", num, fact);
  getch();
}

Friday, July 22, 2016

Fibonacci Series in C Programming

/* Program in C to print fibonacci series upto 10th term */
#include<stdio.h>
#include<conio.h>
void main()
{
  int a=2,b=2,c,i;
  printf(" %d ",a);
  printf(" %d ",b);
  for(i=1;i<=10;i++)
  {
      c=a+b;
     printf("%d ",c);
     a=b;
     b=c;
  }
  getch();
}

Wednesday, December 18, 2013

What is C, What is C++, and What is the Difference?




C is a programming language originally developed for developing the Unix operating system. It is a High-level (also called Middle-level) and powerful language, but it lacks many modern and useful constructs. C++ is a newer language, based on C, that adds many more modern programming language features that make it easier to program than C.

Basically, C++ maintains all aspects of the C language, while providing new features to programmers that make it easier to write useful and sophisticated programs. 

For example, C++ makes it easier to manage memory and adds several features to allow "object-oriented" programming and "generic" programming. Basically, it makes it easier for programmers to stop thinking about the nitty-gritty details of how the machine works and think about the problems they are trying to solve.


So, what is C++ used for?

C++ is a powerful general-purpose programming language. It can be used to create small programs or large applications. It can be used to make CGI scripts or console-only DOS programs. C++ allows you to create programs to do almost anything you need to do. The creator of C++, Bjarne Stroustrup, has put together a partial list of applications written in C++.