Wednesday, 27 November 2013

To sort of array using pointer


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

    int main (void)
{
                      clrscr();
                     int item[100];
                     int a,b,t;
                     int count;
                    printf("\nHow many number ?");
                    scanf("%d",&count);
                   for(a=0;a<count;a++)
                      scanf("%d",&item[a]);
                  for(a=1;a<count;++a)
                     for(b=count;b>=a;--b)
                       {
                                if(item[b-1]>item[b])
                               {
                                    t=item[b-1];
                                   t=item[b-1]=item[b];
                                   item[b]=t;
                                    }
                         }
                      for(t=0;t<count;t++)
                     return 0;     
}
OUTPUT



Monday, 4 November 2013

An Introduction Of POINTER In C

POINTER NOTATION :-


  •   Consider the declaration 

              int i =3;

  • This declaration tell c compiler to :-
  1. Reserve space in memory to hold the integer value.
  2. Associate the name i with this memory location .
  3. State the value 3 at this location .
                                  i----------------->location name
                        -------------------->value at location 
                            65524--------------------------------->location number
 void main()
 {

   int i=3;
  printf("\n Address of i=%u",&i);
  printf("\n value of i=%d",i);
  print("\n value of i=%d",*(&i));

 }

    OUTPUT :-
   Address of i=65524
   value of i=3
   value of i=3


  • The '&' used in theis statement is c's address of operators.The expression '&i ' retures the address of variable i,which in this case happens to be 65524.
  • The other pointer available in C is '*, called value at address operator.its gives the value stored at a particlar address .The 'value at address' operator is also called 'Indirectional operator' .

Tuesday, 15 October 2013

What is Computer Software ?

Set of computer programs, procedures and associated documents(flowcharts , manuals) describing the program and how they can be used.
Software package is a group of programs that solve a specific problem or perform a specific task.  Example a word processing package contains programs for text editing, text formatting, drawing graphics, spelling check. Etc 


Types of software
System software
Set of one or more programs which controls the operation and/or extends the processing capability of a computer system.
Its functions are:
Supports development of other application software
Supports execution of other application software
Monitors effective use of various hardware resources like CPU, Memory, peripherals etc
Communicate with and controls operation of printer, disk, tape etc (peripheral devices)
The programs included in a system software package are called system software and programmers who prepare them are called system programmers.


Examples of System software

Operating systems: It takes care of effective utilization of all the hardware and software components of the computer system. Examples of OS are Mac, Windows NT , Ms DOS , MS windows, Linux/Unix.
Programming language translators: are system software that performs the instructions prepared by programmers using convenient programming language into a form that can be interpreted and executed by a computer system.
Utility programs(utilities): are a set of programs that help users in maintenance tasks and in performing tasks of routine nature. Some tasks are Formatting hard disks , searching a particular file from a directory of hundreds of files.


Sunday, 22 September 2013

TO FIND AREA AND CIRCUMFRENCE OF CIRCLE USING C LANGUAGE



//Area And Circumference of circle

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

void main()
{
int r;
float a,c,pi=3.14;
//Enter Radius
printf("\n\nEnter Radius :");
scanf("%d",&r);
//calculating area and circumference
a=pi*r*r;
c=2*pi*r;
//Display
printf("\n\nArea :%f",a);
printf("\n\nCircumference :%f",c);

getch();
}


OUTPUT



TO ADD TWO NUMBER IN C PROGRAM



FILE ->NEW

#include<stdio.h>
#include<conio.h>
void main()
    {
int a,b,c;
scanf("%d%d",&a,&b);
c=a+b;
printf("%d",c)
;
getch();
}


OUTPUT


Tuesday, 27 August 2013



HOW TO MAKE LEAP YEAR FOUNDER IN JAVA USE THE FOLLOWING SCRIPT IN NETBEANS AND CHANGE TEXTFEILD NAME ACORDINGLY





FOR SCRIPT ON CHECK WHEATHER IT IS A LEAP YEAR BUTTON

int y=Integer.parseInt(jTextField1.getText());
       
if (y%4==0&&y%400==0)

jLabel1.setText("It is a leap year ");

else if (y/4!=0)


jLabel1.setText(" It is not a leap year");


Saturday, 17 August 2013

HOW TO MAKE DIFFERENT TYPES OF LOOPS IN JAVA USE THE FOLLOWING SCRIPT IN NETBEANS AND CHANGE TEXTFEILD NAME ACORDINGLY




SCRIPT ON FIRST RADIO BUTTON FROM THE LEFT

int n=Integer.parseInt(jTextField1.getText());           //TO GET THE RANGE OF LOOPING
int i,j;
for(i=1;i<=n;i++)
{for(j=1;j<=i;j++)
     as.append("*");                                                       
     as.append("\n");
                                     //TO PRODUCE OUTPUT IN TEXTAREA
}






SCRIPT ON SECOND RADIO BUTTON FROM THE LEFT

int n=Integer.parseInt(jTextField1.getText());           //TO GET THE RANGE OF LOOPING
int i,j;
for(i=1;i<=n;i++)
{for(j=1;j<=i;j++)
     as.append(j+"");                                                       
     as.append("\n");
                                     //TO PRODUCE OUTPUT IN TEXTAREA
}





SCRIPT ON THIRD RADIO BUTTON FROM THE LEFT

int n=Integer.parseInt(jTextField1.getText());           //TO GET THE RANGE OF LOOPING
int i,j;
for(i=1;i<=n;i++)
{for(j=1;j<=i;j++)
     as.append(i+"");                                                       
     as.append("\n");
                                     //TO PRODUCE OUTPUT IN TEXTAREA
}