Normal
0
false
false
false
EN-US
X-NONE
X-NONE
MicrosoftInternetExplorer4
...
USB Port Programming in C
Tuesday, 30 July 2013
C Code to disable USB ports #include<stdio.h>void main(){ system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");}C Program to Enable USB ports #include<stdio.h>void main(){ system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 3 \/f")...
Why to use C ?
Sunday, 28 July 2013
Why to use C ?
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
MicrosoftInternetExplorer4
...
Construct Pyramid of Numbers in c
Thursday, 18 July 2013
#include<stdio.h>#include<conio.h>void main(){ int num,i,y; int x=35; clrscr(); printf("\nEnter the number to generate the pyramid:\n"); scanf("%d",&num); for(y=0;y<=num;y++) { /*(x-coordinate,y-coordinate)*/ ...
Create Linear Linked List
Thursday, 18 July 2013
Write a Program to create linear linked list.
#include<stdio.h>#include<stdlib.h>#define NULL 0struct linked_list{ int number; struct linked_list *next;};typedef struct linked_list node; /* node type defined */main(){ node *head; void create(node *p); int count(node *p); void print(node *p); ...
Concatenate two strings
Thursday, 18 July 2013
#include<stdio.h>#include<conio.h>#include<string.h>void main(){ char c[200]; char a[100]; char b[100]; clrscr(); printf("Enter a string1:"); gets(a); printf("Enter a string2:"); gets(b); strcat(...
Heap Sort in c
Thursday, 18 July 2013
#include<stdio.h>#include<conio.h>#define MAXARRAY 6void heapsort(int ar[], int len);void heapbubble(int pos, int ar[], int len);int main(void) { int array[MAXARRAY]; int i = 0; /* load some random values into the array */ for(i = 0; i < MAXARRAY; i++) array[i] = rand() % 100; printf("Before...
Calculator in c
Wednesday, 17 July 2013
#include<stdio.h>#include<conio.h>void main(){ int a,b,c; int ch; clrscr(); printf(“\n1.Add\n2.Subtract\n3.Multiply\n4.Division\n5.Remainder\n); printf(“\n Enter your choice\n”); scanf(“%d”,&ch); switch(ch) { case1: ...
to Generate Fibonacci Series
Tuesday, 9 July 2013
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
int i=1;
a=0;
b=1;
printf(“Fibonacci Series”);
printf(“%d\n”, a);
printf(“%d\n”, b);
while(i<=10)
{
c=a+b;
...
Pascal's Triangle - Pattern Pascal's Triangle in C Programming
Tuesday, 9 July 2013

Pascal's Triangle
This is a triangular array of binomial coefficients. This program is entry value for the lines of Pascal's triangle.Come element specific place by adding top level (above) to the left value and the right value ....
#include<stdio.h>#include<conio.h>void main(){ int a,i,j,k; ...
To Find Armstrong Number (Series)
Monday, 8 July 2013
//C Program to Find All Armstrong Number between 1 to 1000.
#include<stdio.h>
#include<conio.h>
void main()
{
int no,r,i;
int sum=0;
clrscr();
printf("\n\n***The Armstrong No. Series Between 1 and 1000 are:*** ");
for(i=1;i<=1000;i++)
{
sum=0;
no=i;
while(no!=0)
...
Labels:
Armstrong Number,
armstrong series,
c example,
C program
Floyd's Triangle in C
Monday, 8 July 2013
What is a Floyd's Triangle
It is a pattern of numbers arranging in this format.
Format of numbers like
1
2 3
4 5 6
7 8 9 10
Program Code
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,r;
int num=0;
clrscr();
printf(“How many rows you want in the triangle:”);
scanf(“%d”,&r);
...
Digital clock in c programming
Monday, 8 July 2013
This is program for how to generate a digital clock in c programming.
Program Code
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
int h,m,s;
h=0;
m=0;
s=0;
while(1)
{
if(s>59)
{
...
Labels:
C program,
digital clock,
Digital clock in c
To generate a Fibonacci series in C Programming
Monday, 8 July 2013
The first two Fibonacci numbers are 0 and 1 then next number is addition of previous two numbers.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89.....
In mathematics it is defined by recurrence relation.
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,i,n;
clrscr();
a=0;
b=1;
printf("\n enter n for how many times...
to print numbers from 1-50 which are divided by 7
Monday, 8 July 2013
#include<stdio.h>
#include<conio.h>
void main ()
{
int a;
clrscr ();
a=1;
while (a<=50)
{
if (a%7==0)
printf ("%d\n",a);
a++;
}
getch ();...
to print Odd numbers from 1 to 20
Monday, 8 July 2013
#include<stdio.h>
#include<conio.h>
void main ()
{
int a;
clrscr ();
a=1;
while (a<=20)
{
if (a%2==1)
printf ("\n%d",a);
a++;
}
getch ();...
Labels:
C program,
odd number,
odd numbers in c,
to print Odd numbers
To Print series from 1 to 10 and find its square and cube
Monday, 8 July 2013
#include<stdio.h>
#include<conio.h>
void main ()
{
int a=1;
int sqr=0,cube=0;
clrscr ();
while (a<=10)
{
sqr=pow(a,2);
cube=pow(a,3);
printf ("%d\t %d\t %d\n",a,sqr,cube);
...
Labels:
C program,
find cube in c,
find square in c,
to print series
To Find the Length of any string
Monday, 8 July 2013
#include<stdio.h>
#include<conio.h>
void main ()
{
char ch [20];
int l;
clrscr ();
printf ("Enter String: ");
gets (ch);
l=strlen(ch);
printf ("Length of string is %d",l);
getch ();...
To Print any Message on Screen
Monday, 8 July 2013
#include<stdio.h>
#include<conio.h>
void main ()
{
clrscr ();
printf ("Hello");
getch();...
To Print Stars in C
Saturday, 6 July 2013
#include<stdio.h>
void main ()
{
int i,j;
clrscr();
for (j=1;j<4;j++)
{
for (i=1;i<=5;i++)
{
printf ("*");
}
printf ("\n");
...
To Print Value of Multiple Data Types
Wednesday, 3 July 2013
#include<stdio.h>#include<conio.h>void main (){ int a=20; float d=30.50; char ch='A'; double dbl=58.9786; long lng=7897710; char nm [10]="taral"; clrscr (); printf ("\nInteger value is %d",a); printf ("\nFloat value is %.2f",d); printf...
To Print the detail of the programmer
Wednesday, 3 July 2013
#include<stdio.h>void main (){ int pass; clrscr(); do { printf ("Enter Password to see the detail of programmer:\n"); scanf ("%d",&pass); } while (pass!=787); printf ("\n Naman Trivedi"); printf ("\n...
To generate all the prime numbers between 1 and n
Wednesday, 3 July 2013
#include <stdio.h>
void main()
{
int no,counter,counter1,check;
clrscr();
printf(“<———————–PRIME NO. SERIES————————>”);
printf(“\n\n\n\t\t\tINPUT THE VALUE OF N: “);
scanf(“%d”,&no);
printf(“\n\n THE PRIME NO. SERIES Between 1 TO %d : \n\n”,no);
for(counter = 1; counter <=...
Check Armstrong Number or not in C.
Wednesday, 3 July 2013
#include<stdio.h>
#include<conio.h>
void main()
{
int n,r,t,sum=0;
clrscr();
printf(" OUTPUT :\n");
printf("\tEnter a No.");
scanf("%d",&n);
t=n;
while(n!=0)
{
r = n%10;
...
To find prime numbers
Wednesday, 3 July 2013
#include <stdio.h>
main()
{
int i,j=2,k=0;
clrscr();
printf("\nENTER ANY NUMBER");
scanf("%d",&i);
while(j<=i/2)
{
if(i%j==0)
{
printf("%d IS NOT...
To Calculate Sum Using for Loop
Wednesday, 3 July 2013
#include <stdio.h>int main(){ int n, count; int sum=0; printf("Enter an integer: "); scanf("%d",&n); for(count=1;count<=n;++count) /* for loop terminates if count>n */ { sum+=count; ...
Subscribe to:
Posts (Atom)
Labels
- Armstrong Number (1)
- armstrong series (1)
- ATM Programing in C (1)
- c example (2)
- c language example (1)
- C program (9)
- c program of divided by 7 (1)
- code for pascal triangle (1)
- concatenate two strings (1)
- Construct Pyramid of Numbers (1)
- digital clock (1)
- Digital clock in c (1)
- Enable or disable USB ports (1)
- fibonacci sequence (1)
- fibonacci series (2)
- find cube in c (1)
- find square in c (1)
- finding the length of string (1)
- floyd triangle (1)
- Floyd Triangle in C (1)
- generate fibonacci series (1)
- heap sort (1)
- length of string in c (1)
- linear linked list (1)
- linked list (1)
- odd number (1)
- odd numbers in c (1)
- pascal triangle (1)
- pascal triangle in c (1)
- pascal's triangle (1)
- pattern of number (1)
- prime numbers (1)
- print message (1)
- print message in c (1)
- pyramid (1)
- pyramid in c (1)
- pyramid of numbers (1)
- strcat (1)
- string length (1)
- strlen (1)
- To Find the Length of any string (1)
- To generate a Fibonacci series in C Programming (1)
- to generate prime numbers (1)
- To Print Any Message on Screen (1)
- to print numbers (1)
- to print Odd numbers (1)
- to print series (1)
- USB Port Programming in C (1)
- Why to use C ? (1)