Pages

Showing posts with label languages. Show all posts
Showing posts with label languages. Show all posts

Thursday 2 October 2014

Return value of printf() function in C

Return value of printf() function in C


Ans:
A function always returns a value and printf function returns the number of characters successfully printed.


main() 
{ 
int s=1; 
printf("%d",printf("%d %d %d", s,s,s)); 
}
In this above program the inner printf is first called which prints value of s, three times with space between each value, 1 1 1.
Total 5 characters get printed = 3 values and 2 spaces).
As explained earlier the inner printf after printing the values, returns the number of characters printed, 5 which is printed by the outer printf.
The output of the above program is
1 1 1 5


Sunday 14 September 2014

`gets' function is dangerous how to solve this error and why gets function is dangerous?

  `gets' function is dangerous how to solve this error and why gets function is dangerous?







Never use gets(). Because it is impossible to tell without knowing the data in advance how many characters gets() will
read, and because gets() will continue to store characters past the end of the buffer, it is extremely dangerous to use.
It has been used to break computer security. Use fgets() instead.

so we can use fgets():
In the C Programming Language, the fgets function reads characters from the stream pointed to by stream.
The fgets function will stop reading when n-1 characters are read, the first new-line character is encountered in s, or at the end-of-file, whichever comes first. Then the fgets function will append a null character to the string.

Syntax

The syntax for the C Language fgets function is:

char *fgets(char *s, int n, FILE *stream);
  
s is the array where the characters that are read will be stored.

n is the size of s.

stream is the stream to read.

The fgets function returns s. The fgets function will return a null pointer if an error occurs while trying to read the stream or the end of the stream is encountered before any characters are stored.

In the C Language, the required header for the fgets function is:

#include 
 

#include 
char * fgets(char *restrict s, int n, FILE *restrict stream);
Frightening, no? That’s because fgets() is a file function, which reads text from a file, as in “file get string.” That’s how programmers talk after an all-nighter.
Because the operating system considers standard input like a file, you can use fgets() to read text from the keyboard.
Here’s a simplified version of the fgets() function as it applies to reading text input:
fgets(string,size,stdin);
In this example, string is the name of a char array, a string variable; size is the amount of text to input plus one, which should be the same size as the char array; and stdin is the name of the standard input device, as defined in the stdio.h header file.
THE FGETS() FUNCTION READS A STRING
#include 
int main()
{
  char name[10];
  printf("Who are you? ");
  fgets(name,10,stdin);
  printf("Glad to meet you, %s.\n",name);
  return(0);
}

how to check linux kernel is 32 bit or 64 bit




how to check linux kernel is 32 bit or 64 bit

uname -m. It seems like the uname -m actually gives
x86_64 ==> 64-bit kernel
i686   ==> 32-bit kernel

[ SOLVE] E-FAIL ERROR IN VIRTUAL BOX or VM ORACLE MACHINE



[ SOLVE] E-FAIL ERROR IN VIRTUAL BOX or VM ORACLE MACHINE


Runtime error opening 'C:\Users\COMPUTER_NAME\.VirtualBox\Machines\VM_NAME\VM_NAME.xml' for reading: -102 (File not found.).
D:\tinderbox\win-3.2\src\VBox\Main\MachineImpl.cpp[665] (Machine::registeredInit).
Result Code:
E_FAIL (0x80004005)
Component:
VirtualBox
Interface:
IVirtualBox {3f36e024-7fed-4f20-a02c-9158a82b44e6}



SOL:
I went into the folder "C:\Users\COMPUTER_NAME\.VirtualBox\Machines\VM_NAME\" and saw two xml files but for some reason they both had suffixes.
1. VM_NAME.xml-prev
2. VM_NAME.xml-tmp
So it simply just couldn't find "VM_NAME.xml" because it technically didn't exist.
I made a copy of the "VM_NAME.xml-prev" file and renamed the copy to "VM_NAME.xml"
Restarted VirtualBox and it worked just fine.
S0L2:
UPDATE VM AUTOMATICALLY  SOLVE THE ISSUE.

Friday 5 September 2014

what is the difference between and "stdio.h"

what is the difference between

    and "stdio.h"

 

#include"ownheader.h"(own headerfile):

                  compalier will be  look  like as a local directory

#include:

                compalier searches as a standard libraries with in the system.



Wednesday 11 June 2014

LATEST BEST COLLECTION OF ECOMMERCE BLOGGER TEMPLATES FREE DOWNLOAD

CLICK HERE  DOWNLOAD LIVE DEMO THE TEMPLATES:

1.Boutique shopping Responsive e-shopping Blogger Template Free Download 

                                

                              CLICK HERE

 

2.Johny Blackstore Responsive e-shopping Blogger Template Free Download

                           

                                CLICK HERE

 

3. johny mega store blogger ecommerce template download

                   

 

 

                                 CLICK HERE

 

4.johny jass store blogger ecommerce film template download

 

                                 CLICK HERE

 

5.shoppaholic cart ecommerce blogger template download 

 

                                     CLICK HERE

 

6.Johny Crott Ecommerce ekart Blogger Template Free Download 

 

                                CLICK HERE

 

7.BlogrShop Ecommerce ekart blogger template download

 

                             CLICK HERE

Monday 16 December 2013

how to know my mobile phone number(all networks worked)

  • Vodafone-*111*2#
  • Videocon-*1# Bpl-*222#
  • Reliance-*111#or *1#
  • Idea-*100# or *789#
  • Docomo-*580#
  • Airtel-Send SMS IM to 57070 or *282# or *121*9# or *140*1600#
  • Aircel-*#1#888# or*131#
  • Uninor- *1#
  • BSNL -*123# or Call 24365 and ask them Loop- Dial *222#
  • Virgin-Dial *1#
  • Aircel , Docomo ,*1#

how to boot[install] operating system via usb pendrive easily without any software

Bootable Usb Pen Drive

Bootable Usb Pen drive is simple and fast way to format your PC or Laptop. After formatting you can easily install windows in your system. Bootable usb pendrive has several advantage as like easy formatting, easy copy and past windows file and after that easy to installing windows. Now we are discussing some important step to make bootable pen drive.

Advantages :

    Installing process through bootable usb pen drive is much better then DVD.
    Easy to carrying.
    Easy to handle and no need to expert.
    Best option for all who haven’t DVD drive in his PC or Laptop.

Requirement :

    Blank (empty) Pen drive with minimum capacity of 4Gb.

Process :


Step 1 :

Plug-in your pen drive in Laptop.

Step 2 :

Go to Start  >> Type Cmd  (in search program and file)  [Press Enter]
After pressing Enter command prompt will open.

On your Caps lock

Step 3 :

Type  DISKPART   [Press Enter]

bootable usb pen drive

Step 4 :

Type  LIST  DISK    [Press Enter]
It will show all available disk in your system. Disk 0 is usually hard disk of your system. In my case Disk 1 is Usb pen drive (This can be different in your case so plz make sure )

Step 5 :

Type  SELECT  DISK  1  [Press Enter]
Step 6 :

Type  CLEAN  [Press Enter]
Step 7 :

Type  CREATE  PARTITION  PRIMARY   [Press Enter]
Step 8 :

Type  SELECT  PARTITION  1  [Press Enter]
Step 9 :

Type  ACTIVE  [Press Enter]
Step 10 :

Type FORMAT  FS=NTFS  [Press Enter]
Wait Until 100% complete.
Step 11 :

Type  ASSIGN  [Press Enter]
Step 12 :

Type EXIT [Press Enter]

Bootable Usb Pen driveNow bootable usb pen drive is ready to use. After making this copy and paste windows 7 or 8 in your pen drive. It is easiest way to install windows 7 or 8 in your  system.

When you want to install windows, plug-in bootable pen drive and restart the system and press boot function key as per different system (f1——-f12) .

Sunday 29 September 2013

INTRODUCTION TO JAVA AND JAVA EDITIONS AND NUMBER SYSTEMS IN JAVA


java

HISTORY OF JAVA AND DOWNLOAD(PDF)


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.
 what is java slogan:
                      "Write Once Run Anywhere "(WORA)
java is a platform independent programming language.it means that program is written once and the program is executed irrespective of the operating system.
 why java is suitable for internet:
     security problems on internet are eliminated through java.java is a system independent,java is executable on any platform
JAVA HISTORY:
  IN 1990,sun microsystems inc., USA is developed software for remotes..in 1993,oak language is developed,by that time some company is registered oak name,for this reason they named as "java".
in 1995,sun world conference has given entire details of java.

javajavajava software all copy rights are purchased oracle



CLICK HERE DOWNLOAD PDF DOCUMENT 


java editions:


Sun micro systems provides ,with the advent of java,new versions had multiple configurations built for different types of platforms.those are
  • JSE
  • JEE
  • JME.
JSE:java platform,standard edition:
JSE stands for java platform,standard edition,it is specification used to develop fundamental
java application they may be standard or network.

JEE:java platform,enterprise edition:

 JEE stands for java platform, enterprise edition,it is specification used to develop business
solutions for network (or)JEE is specification that provides an environment to run the web components and the enterprise components.

 JME:java platform,micro edition:
JEE stands for java platform, micro edition,it is specification used for developing wireless and
embedded system.embedded system is software,which directly installed into hardware.
java software:
             java software is cotegorized in to two types
                JAVA=JDK+JRE
  JDK
           it stands for java development kit
JRE:
          it stands for java runtime environment 
          JRE=JVM+JAVA LIBRARY

if java programs have to run we required the jvm and java library.jvm will starts execution of java
program from main method only.
  • in java every statement must end with semi colon(;).
  • java is case sensitive 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

HOW TO PATH SET IN JAVA SOFTWARE

After install the java software  following this steps:
step 1:
           select "my computer" icon and right click mouse button.
            now click on "properties" option.it provides a window.click "advanced" tab and click
"environmental variables" window.

now select the path in system variables and click"edit" button.the "edit system variables" window will open.
add "c:\program files\java\jdk1.7.0_05\bin" to 'variable value' and click 'ok','ok' and 'ok' buttons.
now set the class path variable and set its values to "c:\program files\java\jdk 1.7.0-05\lib\tools.jar"
and "c:\program files\java\jdk 1.7.0-05\jre\lib\rt.jar". if this variable has not been declared eariler then create a new system variable by clicking on "new" button and give variable name as "classpath" and variable value
as "c:\program files\java\jdk 1.7.0-05\lib\tools.jar;c:\program files\java\jdk 1.7.0-05\jre\lib\rt.jar;.;"
now click "ok".this variable is used to complie java programs

AND restart your computer
          

Tuesday 30 July 2013

PROPERTIES OF RDBMS IN ORACLE

1.data should store in the form of a table.a table can be different as collection of rows&columns
A horizontal lines as Rows or Records/touples
A vertical lines are known as fields or attributes/columns
the intersection of  rows&columns is known as cell
                              a cell is a place where we can store or a data.the other name of table can be known as entity/object.
 table/entity/object:
             fields/attributes/columns

 rows/records/touples





2.table should not contain duplicate column
3.while do inserts the records the table user no need to follow any specific order.
4.data base should not contain duplicate objects 
5.while do defines columns in the table user follow no need to order

Saturday 27 July 2013

WHAT IS WRAPPER CLASS & WAHT IS BOXING & UNBOXING&WHAT IS AUTO BOXING&AUTO UNBOXING

WHAT IS WRAPPER CLASSES:
                   In order to represent the primitive data type values with the concept of object we are going to
use some pre defined classes.
            The classes which we are using to represent primitive data values in the form of object are called as WRAPPER CLASSES.
                    to represent the each&every primitive datatype value in the form of object there will be a corresponding class is available.




        




all the wrapper classes are present inside a predefined package called as java.lang

Integer i1=new Integer(100);
Integer i2=new Integer("123");



WHAT IS BOXING:
                     the concept of representing the primitive data type value in the form of it's equivalent wrapper class object is known as boxing.
 int i=200;
Integer i1=new Integer(i);//boxing


WHAT IS UNBOXING
:
                   the concept of getting back the primitive data value which is present inside wrapper class object to corresponding primitive data type value is known as unboxing>
              int i=100;
              integer i1=new integer(i)//boxing
              int j=i1.value()//unboxing
 in order to perform unboxing we are going to use the predefined methods which are present inside wrapper classes
ex:
        class wdemo()
         {
           public static void main()
           Integer i1=new Integer(100);
           system.out.println(i);
           Integer i2=new Integer("1234");
          system.out.println(i2);
           int i=i1.intvalue();
           int j=i2.intvalue();
           int k=i+j;
           system.out.println(k);
           Integer i3=new Integer();
              system.out.println("hello");
}
}

output:
              100   
              1234   
              1334
               hello

AUTO BOXING:
                    The concept of representing the primitive data value in the form of corresponding wrapper class object automatically by the jvm is known as auto boxing.
                    int i=100;
                    Integer i1=i;//integer i1=i Integer(i);

ex:
         int i=300;
         Integer i1=new Integer(400);
         int j=i+i1;


AUTO UNBOXING:
                          
                  The concept of geeting back the primitive data type value which is present inside wrapper class object automatically by the jvm is known as auto boxing.
                     Integer i2=new integer(200);
                      int j=i2//int j=i2.intvalue();

ex:
         int i=400;
         Integer i1=new Integer(300);
         Integer i2=i1+i;
ex:
        class wdemo2()
         {
             public static void main()
             {
              Integer i1=new Integer(100);
              Integer i2=new Integer("1234");
              Integer j=i1+i2;
              System.out.println(j);
               System.out.println("hello");
       }
     } 
output:
          1334
           hello   
              


                     

Friday 19 July 2013

DOWNLOAD JAVA SOFTWARE:Java SE Development Kit 7 Download

Java SE Development Kit 7 Downloads


Thank you for downloading this release of the Java Platform, Standard Edition Development Kit (JDK). The JDK is a development environment for building applications, applets, and components using the Java programming language.
The JDK includes tools useful for developing and testing programs written in the Java programming language and running on the Java platform.
Java Applet & Web Start - Code Signing 
Starting with Java SE 7u21 all Java Applets and Web Start Applications are encouraged to be signed with a trusted certificate.

Oracle Java SE Critical Patch Update Advisory - April 2013

World's Fastest Server for Java! This white paper describes the key features of Oracle Solaris that make it the best platform for deploying Java applications.

Oracle Security Alert for CVE-2013-1493 (March 4, 2013)

JDK 8 (with JavaFX) Early Access for ARM - An Early Access release of JDK 8, including JavaFX, on Linux for ARM processors is now available immediate download from Java.net.

for
Oracle Academy Introduces New Java Curriculum - Java Courses Allow Students to Graduate with Industry-Relevant Ski


download java software:

choose os and download it click here
note:enter into page first accept the license

Thursday 18 July 2013

HISTORY OF JAVA AND DOWNLOAD(PDF)

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.

what is java slogan:
                      "Write Once Run Anywhere "(WORA)
java is a platform independent programming language.it means that program is written once and the program is executed irrespective of the operating system.

why java is suitable for internet:
     security problems on internet are eliminated through java.java is a system independent,java is executable on any platform
note:know the what is platform and what platform independent click

JAVA HISTORY:
  IN 1990,sun microsystems inc., USA is developed software for remotes..in 1993,oak language is developed,by that time some company is registered oak name,for this reason they named as "java".
in 1995,sun world conference has given entire details of java.

                                  about j2se and j2me and j2ee clck here
java software all copy rights are purchased oracle



CLICK HERE DOWNLOAD PDF DOCUMENT

Sunday 14 July 2013

Oracle database 11g software download

Oracle Database 11g Express Edition


Free to develop, deploy, and distribute


Oracle Database 11g Express Edition (Oracle Database XE) is an entry-level, small-footprint database based on the Oracle Database 11g Release 2 code base.  It's free to develop, deploy, and distribute; fast to download; and simple to administer.
Oracle Database XE is a great starter database for:
  • Developers working on PHP, Java, .NET, XML, and Open Source applications
  • DBAs who need a free, starter database for training and deployment
  • Independent Software Vendors (ISVs) and hardware vendors who want a starter database to distribute free of charge
  • Educational institutions and students who need a free database for their curriculum
With Oracle Database XE, you can now develop and deploy applications with a powerful, proven, industry-leading infrastructure, and then upgrade when necessary without costly and complex migrations.
Oracle Database XE can be installed on any size host machine with any number of CPUs (one database per machine), but XE will store up to 11GB of user data, use up to 1GB of memory, and use one CPU on the host machine.

download oracle software:
   note: click below and accept license and registered the oracle website and download         

Download Oracle Database Express Edition 11g Release 2 for Windows x32 click here
- Unzip the download and run the DISK1/setup.exe
- Does not work in Windows x64
Download Oracle Database Express Edition 11g Release 2 for Linux x64 click here
-Unzip the download and the RPM file can be installed as normal
 

JAVA EDITIONS AND WHAT IS JDK AND JRE

Sun micro systems provides ,with the advent of java,new versions had multiple configurations built for different types of platforms.those are
  • JSE
  • JEE
  • JME.
JSE:java platform,standard edition:
JSE stands for java platform,standard edition,it is specification used to develop fundamental
java application they may be standard or network.

JEE:java platform,enterprise edition:

 JEE stands for java platform, enterprise edition,it is specification used to develop business
solutions for network (or)JEE is specification that provides an environment to run the web components and the enterprise components.

 JME:java platform,micro edition:
JEE stands for java platform, micro edition,it is specification used for developing wireless and
embedded system.embedded system is software,which directly installed into hardware.
java software:
             java software is cotegorized in to two types
                JAVA=JDK+JRE

                                    


JDK:
           it stands for java development kit
JRE:
          it stands for java runtime environment 
          JRE=JVM+JAVA LIBRARY

if java programs have to run we required the jvm and java library.jvm will starts execution of java
program from main method only.
  • in java every statement must end with semi colon(;).
  • java is case sensitive programming language.

WEKA 3.7.9 SOFTWARE DIRECT DOWNLOAD



Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from your own Java code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization. It is also well-suited for developing new machine learning schemes.
Found only on the islands of New Zealand, the Weka is a flightless bird with an inquisitive nature. The name is pronounced like this, and the bird sounds like this.
Weka is open source software issued under the GNU General Public License.

 DOWNLOAD WEKA SOFTWARE:
       weka 3.7.9 software CLICK HERE (52.11MB)

Friday 12 July 2013

NET BEANS IDE 7.3.1 SOFTWARE DIRECT DOWNLOAD

Below The following learning provide you with everything you need to know to develop applications using NetBeans IDE.

 


DIRECT  DOWNLOAD LINK:
  download net beans 7.3.1 click here (223.82MB)












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.