Wednesday, 27 September 2017

8 Tips to Choose the Perfect Domain Name

Any website needs a domain name. Without one, your site or blog can not exist. This element can make or break your business. Thus, you need to choose a domain name that is easy to find and promote, fits your niche, and reflects your brand.
Currently, there are over 150 million domain names in use. If you want to stand out, you need one that is unique and catchy.
How to Choose the Perfect Domain Name

Tips to Choose the Perfect Domain Name

Follow these steps to choose the perfect domain name for your website or blog:
Make It Relevant
Think of your domain name as a marketing tool. It needs to be short, concise, and easy to remember. The right domain name can help you create buzz and promote your brand to the target audience. Ideally, choose one that includes your company’s name or other meaningful words with mass appeal. Branded domains aid in word of mouth marketing and help build credibility.
Choose the Right Extension
Even though you can use any extension, it’s recommended to go for a dot-com domain name. Many clients see this as an indicator of the credibility of your business. The dot-com extension is the most popular and inspires trust. Depending on your niche, you can also opt for dot-co, dot-info, dot-net, dot-org, or dot-biz extensions.
Keep It Short and Simple
The perfect domain name should be short, concise, and memorable. If you pick one that is too long, you risk customers misspelling or mistyping it. This can also make it harder for prospects to find your site on search results. As a rule of thumb, look for domains that contain one to three words. Shorter is always better.
Use Keywords
If possible, use keywords that describe your brand and the services you offer. For instance, you provide SEO services online, you may want to register onlineseoservices.com or bestseoservice.com. Although keyword-targeted domains are not as important as they used to be, they still help. Try to find a memorable, brand-related domain name that clients can easily associate with your business.
Target Your Area
Local business owners should include their city or state in the domain name. This will make it easier to local clients to find your company online. For example, if you run a SEO agency in Phoenix, you can use Phoenixseoservices.com.
Avoid Hyphens and Numbers
Most customers forget the dash when typing a domain name. If your website has a hyphened domain, this can affect sales. The same goes for numbers. Stay away from them at all costs.
Think Long-Term
Do not include years or trends in your domain unless you’re planning to use it only for a short time. Keep searching until you find a classic name that is not tied down to a trend. Avoid obscure terms, slang, and niche-specific words that customers might not be familiar with.
Consider the Price
Compare prices online before you register a new domain name. Most companies offer service for $10 to $12. Some web hosting plans include one or more free domains, so it’s worth shopping around.

Saturday, 23 September 2017

C Program to Find Roots of Quadratic Equation

Here you will get C program to find roots of quadratic equation ax2+bx+c=0

Program:


#include<stdio.h>
#include<math.h>

int main()
{
    float root1,root2,a,b,c,d,imaginaryPart,realPart;
    printf("Quadratic Equation is ax^2+bx+c=0");
    printf("\nEnter values of a,b and c:");
    scanf("%f%f%f",&a,&b,&c);
    
    d=(b*b)-(4*a*c);
    if(d>0)
    {
        printf("\nTwo real and distinct roots");
        root1=(-b+sqrt(d))/(2*a);
        root2=(-b-sqrt(d))/(2*a);
        printf("\nRoots are %f and %f",root1,root2);
    }
    else
        if(d==0)
        {
            printf("\nTwo real and equal roots");
            root1=root2=-b/(2*a);
            printf("\nRoots are %f and %f",root1,root2);
        }
        else{
            printf("\nRoots are complex and imaginary");
            realPart = -b/(2*a);
            imaginaryPart = sqrt(-d)/(2*a);
            printf("\nRoots are %.2f+%.2fi and %.2f-%.2fi", realPart, imaginaryPart, realPart, imaginaryPart);
        }

    return 0;            
}


Output
Quadratic Equation is ax^2+bx+c=0
Enter values of a,b and c:1
1
1
Roots are complex and imaginary
Roots are -0.50+0.87i and -0.50-0.87i


 

C program to swap two numbers without using temporary variable

C program to swap two numbers without using temporary variable
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y;
clrscr();
printf(“Enter value of X: “);
scanf(“%d”,&x);
printf(“Enter value of y: “);
scanf(“%d”,&y);
if(x>y)
{
y=x-y;
x=x-y;
y=x+y;
}
else
if(y>x)
{
x=y-x;
y=y-x;
x=y+x;
}
printf(“nx=%d”,x);
printf(“ny=%d”,y);
getch();
}

C Program to Check Number is Even or Odd

Here you will get C program to check given number is even or odd.
We will use following simple logic in this program.
If a number is divisible by 2 then it is even.
If a number is not divisible by 2 then it is odd.

 Output
Enter any number:17
The number is odd

C program to convert temperature from Fahrenheit to Celsius or Celsius to Fahrenheit

    
#include<stdio.h>
#include<conio.h>
void main()
{
double temp,ctemp;
int ch;
clrscr();    //to clear the screen
    printf(“Temprature Converrsion Menu”);
printf(“nt1.Fahrenheit to Celsius”);
printf(“nt2.Celsius to Fahrenheit”);
printf(“nEnter your choice(1/2):”);
scanf(“%d”,&ch);
if(ch==1)
{
printf(“Enter Temperature in Fahrenheit:”);
scanf(“%lf”,&temp);
ctemp=(temp-32)/1.8;
printf(“nTemprature in celcius is %lf”,ctemp);
}
else
if(ch==2)
{
printf(“Enter Temperature in Celsius:”);
scanf(“%lf”,&temp);
ctemp=(1.8*temp)+32;
printf(“nTemperature in Fahrenheit is %lf”,ctemp);
}
else
printf(“nWrong choice…..!!”);
getch();    //to stop the screen
}

C program to find out whether a given year is a leap year or not


#include<stdio.h>
#include<conio.h>
void main()
{
int year;
clrscr(); //to clear the screen

printf(“Enter any year(4-digit):”);
scanf(“%d”,&year);
if(year%100==0)
{
  if(year%400==0)
     printf(“Leap Year”);
}
else
  if(year%4==0)
printf(“nLeep Year”);
else
printf(“nNot leap year”);
getch(); //to stop the screen
}

C program to find greatest number among three numbers

C program to find greatest number among three numbers
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,z,max;
clrscr();
printf(“Enter The Three Numbers:”);
scanf(“%d%d%d”,&x,&y,&z);
max=x;
if(y>max&&y>z)
max=y;
else
if(z>max)
max=z;
printf(“nThe Greatest Number among %d %d %d is %d”,x,y,z,max);
getch();
}

Friday, 15 September 2017

Convert Binary to Decimal in C

ere you will get program to convert binary to decimal in C.
We can obtain a decimal number by multiplying each digit of binary number with power of 2 and adding each multiplication result. The power starts from 0 and goes to n-1 where n is the total number of digits in binary number.
Below is the program to implement this in C.

Convert Binary to Decimal in C


Output
Enter any binary number: 111
The decimal conversion of 111 is 7

Program for Factorial in C

Here you will get program for factorial in C.
We can find factorial of any number by multiplying it with all the numbers below it.
For example, factorial of 3 will be 6 (3 * 2 * 1).

Program for Factorial in C


Output
Enter value of n:4
Factorial of 4 is 24

Program for Prime Number in C

Here you will get program for prime number in C.
A number that is only divisible by 1 or itself is called prime number.
For example, 17 is prime, 6 is not prime, etc.

Program for Prime Number in C


Output
Enter any number:15
The given number is not prime

C Program to Print Multiplication Table of Given Number

Here you will get C program to print multiplication table of given number.
Below program will ask user to enter a number then display its table.



#include<stdio.h>
 
int main()
{
    int i,n;
    printf("Enter any number:");
    scanf("%d",&n);
    printf("Table of %d is:\n", n);
    
    for(i=1;i<=10;++i)
        printf("\n%d*%d=%d",n,i,n*i);
 
    return 0;
}


Output
Enter any number:6
Table of 6 is:
6*1=6
6*2=12
6*3=18
6*4=24
6*5=30
6*6=36
6*7=42
6*8=48
6*9=54
6*10=60

C program to find average of list of numbers entered through keyboard

#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,sum=0,e;
float avg;
clrscr(); //to clear the screen

  printf(“How many elements:”);
scanf(“%d”,&n);
printf(“Enter all the elements one by one:”);
for(i=0;i<n;++i)
{
scanf(“%d”,&e);
sum+=e;
}
avg=sum/n;
printf(“nAverage=%f”,avg);
getch(); //to stop the screen
}

C program to print the truth table for XY+Z

C program to print the truth table for XY+Z

#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,z;
clrscr(); //to clear the screen
printf(“XtYtZtXY+Z”);

for(x=0;x<=1;++x)
for(y=0;y<=1;++y)
for(z=0;z<=1;++z)
{
if(x*y+z==2)
printf(“nn%dt%dt%dt1”,x,y,z);
else
printf(“nn%dt%dt%dt%d”,x,y,z,x*y+z);
}
getch(); //to stop the screen
}

C program to find largest number of a list of numbers entered through keyboard


C program to find largest number of a list of numbers entered through keyboard #include<stdio.h>
#include<conio.h>
void main()
{
int i,n,x,large=0;
clrscr(); //to clear the screen

printf(“How many numbers?”);
scanf(“%d”,&n);
for(i=0;i<n;++i)
{
printf(“nEnter number %d:”,i+1);
scanf(“%d”,&x);
if(x>large)
large=x;
}
printf(“nnThe largest number is %d”,large);
getch(); //to stop the screen
}

Program to Reverse Number in C

#include<stdio.h>
 
int main()
{
    long n,rev=0,d;
    printf("Enter any number:");
    scanf("%ld",&n);
    
    while(n!=0)
    {
        d=n%10;
        rev=(rev*10)+d;
        n=n/10;
    }
    
    printf("The reversed number is %ld",rev);
 
    return 0;
}

Output
Enter any number:16789
The reversed number is 98761

Program for Armstrong Number in C

Here you will get program for armstrong number in C.
Armstrong number is n digits number whose sum of digits raised to power n is equal to itself.
For example:
371 is armstrong number because 3+ 7+ 13 = 27 + 343 +1 = 371.

Program for Armstrong Number in C

#include<stdio.h>
#include<math.h>
 
int main()
{
    int n,m=0,p=0,x,y;
    printf("Enter any number: ");
    scanf("%d",&n);
 
    y=n;
    
    while(y!=0){
        y=y/10;
        p++;
    }
    
    y=n;
    
    while(n!=0)
    {
        x=n%10;
        m+=pow(x,p);
        n=n/10;
    }
    
    if(y==m)
        printf("The given number is an armstrong number");
    else
        printf("The given number is not an armstrong number");
 
    return 0;
}
 
Output
Enter any number: 371
The given number is an armstrong number
 

 

C program that accepts marks in 5 subjects and outputs average marks

C program that accepts marks in 5 subjects and outputs average marks
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,d,e,average;
clrscr();

printf(“Enter marks of subject 1:”);
scanf(“%d”,&a);
printf(“Enter marks of subject 2:”);
scanf(“%d”,&b);
printf(“Enter marks of subject 3:”);
scanf(“%d”,&c);
printf(“Enter marks of subject 4:”);
scanf(“%d”,&d);
printf(“Enter marks of subject 5:”);
scanf(“%d”,&e);
average=(a+b+c+d+e)/5;
printf(“nAverage=%d”,average);
getch();
}

C program to raise any number x to a positive power n

#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
int x,n,result;
clrscr(); //to clear the scrren
printf(“Enter value of x and n:”);
scanf(“%d%d”,&x,&n);
result=pow(x,n);
printf(“nResult=%d”,result);
getch(); //to stop the screen
}

C program to print ASCII value of a character

#include<stdio.h>
#include<conio.h>
void main()
{
int a;
char ch;

clrscr(); //to clear the screen
printf(“Enter any character:”);
scanf(“%c”,&ch);
a=ch;
printf(“ASCII value of %c is %d”,ch,a);
getch(); //to stop the screen
}

C program that accepts radius of a circle and print its area

#include<stdio.h>
#include<conio.h>

void main()
{
float radius,area;
clrscr(); //to clear the screen
printf(“Enter radius of the circle:”);
scanf(“%f”,&radius);
area=3.14*(radius*radius);
printf(“Area=%f”,area);
getch(); //to stop the screen
}

C++ Program to calculate sum and average of three numbers

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr() //to clear the screen
float a,b,c,sum,av;
cout<<“Enter three numbers:”;
cin>>a>>b>>c;
sum=a+b+c;
av=sum/3;
cout<<“nSUM=”<<sum;
cout<<“nAverage=”<<av;
getch(); //to stop the screen
}

C program to calculate simple interest

#include<stdio.h>
#include<conio.h>
void main()
{

float p,r,t,si;
clrscr();    //to clear the screen
printf("Enter principal,rate and time;");
scanf(“%f%f%f”,&p,&r,&t);
si=(p*r*t)/100;
printf(“nSI=%f”,si);
getch(); //to stop the screen
}

Tech UOG