Archive for July 2012

How to identify our computer is 32-bit or 64-bit

Some times we will get confusion or we don't know our pc is 32-bit machine or 64-bit machine. we should know this information which is useful for some time while you are downloading and install the software. because some software can support only 32-bit or 64-bit only..

To determine our computer is 32-bit or 64-bit
Follow these steps.

Open the System Information
Open the Start menu, and click on Programs -> Accessories -> System Tools -> System Information 
Look for  System type item which is  available at right hand side of the window

The value of this item will tell you whether your computer is 32-bit or 64-bit:

  • x86-based PC: It’s a 32-bit computer.
  • x64-based PC: It’s a 64-bit computer.

Leave a comment

Exercise and solved in C language

Write a program to swap two numbers.

        Answer:

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,temp;
clrscr();
printf("Enter the value for a: ");
scanf("%d",&a);
printf("Enter the value for b: ");
scanf("%d",&b);
temp=a;
a=b;
b=temp;
printf("\n Swaping of two numbers a=%d \t b=%d",a,b);
getch();





Write a program to find area of circle (radius is input by the keyboard)

#include<stdio.h>
#include<conio.h>
#define PI 3.14
void main()
{
int r;
float area;
clrscr();
printf("Enter the radius of the circle");
scanf("%d",&r);
area=PI * r * r;
printf("The Area of the circle is %f",area);
getch();
}



Write a program to find area of triangle and rectangle. 

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

void main()
{
int tri_hight,tri_breadth,rect_hight,rect_breadth;
float area_tri,area_rect;
clrscr();
printf("Enter the Hight and Breadth of Rectangle: ");
scanf("%d%d",&tri_hight,&tri_breadth); 
printf("Enter the Hight and Breadth of the triangle: ");
scanf("%d%d",&rect_hight,&rect_breadth);
area_tri=0.5 * tri_hight * tri_breadth;
area_rect=rect_hight * rect_breadth;
printf("\nThe Area of the Triangle: %.2f",area_tri);
printf("\nThe Area of the Rectangle: %.2f",area_rect);
getch();
}


Write a program to find Total marks & percentage of the 6 subjects marks.

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

void main()
{
int s1,s2,s3,s4,s5,s6,total;
float avg;
clrscr();
printf("Enter the 6 subjects marks: " );
scanf("%d%d%d%d%d%d",&s1,&s2,&s3,&s4,&s5,&s6);
total=s1+s2+s3+s4+s5+s6;
avg=(float)total/6;
printf("\nTotal marks of the 6 subjects: %d",total);
printf("\nAverage marks of the 6 subjects: %.2f",avg);
getch();
}

Posted in , | Leave a comment