ALT_IMG

You are the cause of my pain

You are the cause of my pain, yet the love I feel for you is my only consolation, my only cure..

ALT_IMG

Saw the girl, whom once I thought as my best friend

Remembering my classmates, after few years, My eyes were filled with tears, Everyone is busy a lot, No one escaped destiny's plot, Saw the girl, whom once I thought as my best friend, Today she is some body else's girl friend, After months remembered about her for a little while, Heard she is happy, that made me smile.

Alt img

It’s been raining since you left me

It’s been raining since you left me, now I’m drowning in the flood. You see, I’ve always been a fighter, but without you I give up.

ALT_IMG

Sweet Heart

Sweetheart.....I miss ......THe whisper of your voice...The warmth of your touch and all the wonderful times that we shared together.......

ALT_IMG

When I see you

When I see you smile and know that it's not for me, that's when I miss you the most.

Tuesday, August 10, 2010

BINARY TO DECIMAL CONVERSION

0 comments


#include<stdio.h>
#include<stdio.h>  
#include<stdio.h>
void main()
{
int i=0,num,decimal=0;
long n;
printf("Enter the binary number:");
scanf("%d",&n);
while(n>0)

num=n%10;
decimal=decimal+num*pow(2,i);
n=n/10;
i=i+1;
}
printf("The decimal number is %d",decimal);
getch();
}







Algorithm:

1.Start.
2.Read the binary number,n
3.Calculate ai2n-1+ai2n-2+ai2n-3+..................+ai2
4.Print the decimal equivalent of the binary.
5.Stop.
Continue reading →

DECIMAL TO BINARY CONVERSION

0 comments
#include<stdio.h>
#include<conio.h>
#include<math.h> 
void main()
{
int bin[10],i,j,N;
printf("Enter the decimal number:");
scanf("%d",&N);
i=0;
while(N>0)
{
bin[i]=N%2;
N=N/2;
i=i+1;
}
printf("The binary number is:");
for(j=i-1;j>=0;j--)
{
printf("%d",bin[j]);
}
getch();
}






Algorithm:

1.Start.
2.Read the decimal number.
3.Calculate the binary number using double-dabble method.
4.Print the binary equivalent of the decimal.
5.Stop.



Continue reading →
Sunday, August 8, 2010

BASICS OF C PROGRAMMING

0 comments



                        The C program language is a popular and widely used programming language for creating computer programs.If you are interested in becoming a programmer,i will help you .I will teach you to read and write C program.I  explained the basic features of C program for beginners which should help you to understand how does a C program work.In this article,we will walk through the entire language and show you how to become a C programmer,starting at the beginning.You will be amazed at all of the different things you can create once you know C!.


Execution of C program


 Here we will discuss about the execution of C program  step by step.


step1:The line int main() declares the main function.Every C program must have a function named main somewhere in the code.At run time,program execution start at the first line of the main function.In C,the { and } symbols mark beginning and end of a block of code.The line int a,b,c; created three variables(created three memory locations with a address).It help us to store data







step2:Here,the first prompt displayed to the user by using printf statement.The printf statement in C allows you to send output to standard out(for us,the screen).





step3:If you enter a data.It is stored into the memory location "a"."&a" means write  data into the location"a".






step4:Here,the second prompt displayed to the user.






step5:And the second data stored into the second memory location "b".






step6:Here,we will used a formula c=a+b; (the value of a+b is stored into "c")






step7:The line "5+4=9" is formed and displayed to the user.








Home Next>>

Continue reading →