Pages

Friday, 12 July 2013

HOW TO REPRESENT NUMBER SYSTEMS IN PROGRAMMING LANGUAGE???

In this real world we have 4 types of number systems they are:
1.binary number system           [format:0,1]
2.octal number system             [format:0,1----7]
3.decimal number system        [format:0,1-----9]
4.hexa decimal system             [format:0,1---9,a,b,c,d,e,f ] 
genarally we use the decimal number system in any programming language.

  In java we can represent the binary values by giving ob infront of the number
ex: int ob10;(correct)
     int x=o4235;(wrong)

representation of the binary number feature is introduced in java 1.7


we can represent the octal values in java programming language by giving o infront of the number
ex: int i=o24;(correct)
        int k=o248;(wrong)[because octal range 0-7]

we can represent the hexa decimal values in java programming language by giving ox infront of the number
ex: int i=ox123;(correct)
        int k=ox245a;(wrong)
         int k=123a;(wrong)

note:JVM takes the binary data ,octal data,decimal data,hexa decimal data convert in the form of decimal format and give the output as adecimal
example programme:
  class ndemo
{
public static void main(String args[])
{
  int i=24;
int j=o72;
int k=ox2a;
int l=ob10;
System.out.println(i);
System.out.println(j);
System.out.println(k);
System.out.println(l);
}
}
note:this programme run java 1.7 or above versions because binary values format does not suppport java 1.7 below versions.
output:
24
58
42
2


Friday, 5 July 2013

HISTORY OF C LANGUAGE

In c family there are different languages like following the chart:
 

the language B was developed by ken thmson in the year 1968 at AT&T( American Telephone and Telegraph Company)Bell labs.
By adding the new features do a B language a new language was developed that is 'C'
  the C language was developed by denis ritche and ken thmson this language was developed in a time period from 1970-1973,but the major invention development was happend in the year 1972.
the c language was developed at AT&T bell labs.

Friday, 28 June 2013

what is system.out.println() in java language???

system.out.println():
                system is predefined class which is available in java.lang predefined package.
                                       out is a static reference varaiable of system class,which represnts the object of print stream class
println():
           println is a non static method which is present inside print stream class
printstream():
            printstream is a pre defined class which is available in java.io predefined package
  class system
  {
    static print stream out=new printstream();
     }

class printstream()                                            
{
   void println()
    {
       ------------
        --------------
     }
  void print()
{
  ------------
      -------------
}
void printf()
{
 --------------
----------------
}
}


WHAT IS JAVA? WHY JAVA PLATFORM INDEPENDENT???

WHAT IS JAVA:
           java is a object oriented,platform independent programming language from sun micro system which is released into the marked on the name of development of the distributed applications.
object oriented:
                 the languages which are implementing the OOPS principles are called as object oriented programming language(OOPL)
first known the platform
what is platform:
operating system+architecture of processor together is known as plotform
platform independent:
anything which is not specific to that platform is known as platform independent
the compile code of the any programmng language would be executed irrespectives of platform under
which has been developed then those programming language are called platorm independent.best example java language
HOW TO ACHIEVE TO PLATFORM INDEPENDENCY IN JAVA:
we can achieve the platform independency in java by using jvm.
what is JVM(java virtual machine):
jvm is a collection of programs.the functionality of the jvm is it will convert the byte code in the form of machine
understanle format
note:jvm is a platform dependent because jvm is specific to each and every os.

Thursday, 23 May 2013

BLOGGER WIDGET :HOW TO ADD SOCIAL PLUGIN FACEBOOK LIKE BUTTON IN BLOGGER

Like and share stuff from other websites with your friends on Facebook.interacting with social plugin your friends.following the steps add your blog/website social plugin
1.login your facebook account and see the bottom of the facebook create page

 2.click the create page after open choose your Facebook Page to build a closer relationship with your audience and customers
3.suppose i am choose the company and  click company enter details next click get started button
4. Add a description and website to improve the ranking of your Page in search and basic information
5.upload your page photo and set facebook address next advertise will be skipped
            ok success your page created.
next go to the face book social plugin click here
choose your button.for  example i am click the like button and fill the details

URL:your face book page url
 note:Send Button (XFBML Only)
choose font,width etc and click get code and show the codes choose the IFRAME code.

copy this code and paste this your blog gadget
       

Monday, 20 May 2013

C LANGUAGE INTRODUCTION

The only way to learn a new programming language is by writing programs in it. The first program to write is the same for all languages:
Print the words:hello, world

In C, the program to print ``hello, world'' is
#include
main()
{
printf("hello, world\n");

}
Just how to run this program depends on the system you are using. 

complie the program click the alt+F9.and dispaly errors and warning.errors and warnings must be zero and next run the program click ctrl+F9 to display the output
As a specific example, on the UNIX operating system you must create the program in a file whose name ends in ``.c'', such as hello.c, then compile it with
the command
cc hello.c
If you haven't botched anything, such as omitting a character or misspelling something, the compilation will
proceed silently, and make an executable file called a.out. If you run a.out by typing the command
a.out
it will print
hello, world

ANOTHER EXAMPLE:
An example of simple program in C
#include
int main(void)
{
          printf(“HAI HOW ARE YOU\n”);
          printf(“FINE ”);
          printf(“you know the trick\n”);
          return(0);
 
The previous program will produce the following output on your screen 
 HAI HOW ARE YOU
 FINE you know the trick
 
a C program line begins with # provides an instruction to the C preprocessor
It is executed before the actual compilation is done.
Two most common directives :
#include
#define 
In our example (#include) identifies the header file for standard input and output needed by the printf().
 
Identify the start of the program
Every C program has a main ( )
'main' is a C keyword.  We must not use it for any other variable
 
Identify a segment / body of a program
The start and end of a function
The start and end of the selection or repetition block.
Since the opening brace indicates the start of a segment with the closing brace indicating the end of a segment, there must be just as many opening braces as closing braces  (this is a common mistake of beginners) 
 
Each statement in C needs to be terminated with semicolon (;) 

Each statement in C needs to be terminated with semicolon (;)