Facebook Twitter Gplus E-mail RSS
 
 
Home » Archive for category "C/C++"

Archive for the ‘C/C++’ Category:


C program to create a Binary Tree

Published on September 27th, 2010 by in C/C++

#include stdio.h #include stdlib.h struct node { int data; struct node *left,*right; }; void create(struct node **p,int d) { if(*p==NULL) { *p=(struct node *)malloc(sizeof(struct node));

(Read More)…

Find Odd or Even Number in C

Published on September 27th, 2010 by in C/C++

#include stdio.h #include conio.h void main() { int a; printf(“Enter your number: “); scanf(“%d”,&a); if(a%2 == 0) { printf(“Number is Even”); } else { printf(“Number

(Read More)…

Program to find Leap Year in C

Published on September 27th, 2010 by in C/C++

#include stdio.h int main() { int year; printf(“Enter year\t”); scanf(“%d”,&year); if (((year%4==0) && (year%100!=0))||(year%400==0)) printf(“Leap Year \n”); else printf(“Not a Leap Year \n”); }

 
© mythrobin•com
credit