<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-762112826873555589</id><updated>2024-11-05T18:43:28.285-08:00</updated><category term="Basics of Java"/><category term="Introduction to Java"/><category term="File Handling"/><category term="operator overloading"/><category term="How to create a Java Program"/><category term="Java"/><category term="Polymorphism"/><category term="Binary Files"/><category term="Constructor"/><category term="Double linked list"/><category term="Inheritance"/><category term="Java first step"/><category term="Pure Virtual Function"/><category term="Reading a file using the get()."/><category term="String args[]"/><category term="Virtual Functions"/><category term="career options in IT"/><category term="method overloading"/><category term="Abstract Class."/><category term="Abstract Classes and Methods"/><category term="Abstraction"/><category term="Access specifiers"/><category term="Adding nodes to a list"/><category term="Advantages of an IDE"/><category term="Binary Sorted Tree : Source Code"/><category term="Binary Sorted Trees"/><category term="Binary Tree"/><category term="Bytecode"/><category term="C history"/><category term="Circular Linked List"/><category term="Circular Linked List : Source Code"/><category term="Class Using Arrays"/><category term="Classes and Object"/><category term="Command Line Arguments"/><category term="Constructor In Inheritance"/><category term="Copy Constructor"/><category term="Copying a file"/><category term="Declaring a class"/><category term="Destructor"/><category term="Disadvantages of an IDE"/><category term="Dynamic memory allocation"/><category term="Eclipse"/><category term="Encapsulation"/><category term="File Modes"/><category term="Function Overloading"/><category term="History of Java"/><category term="How does it work ?"/><category term="IDE"/><category term="IT Career"/><category term="IT industry"/><category term="IT job roles"/><category term="IT jobs"/><category term="Inheritance and Access Specifiers"/><category term="Introduction"/><category term="JDK"/><category term="JRE"/><category term="JVM"/><category term="Java Data Types"/><category term="Java Variables"/><category term="Linked List Manipulation"/><category term="Macros - Conditional Compilation"/><category term="NetBeans"/><category term="OOPS"/><category term="Object Orientation Paradigm"/><category term="Parameterized constructors in inheritance"/><category term="Passing Parameters"/><category term="Path"/><category term="Polymorhpism - Function Overloading"/><category term="Process of File Handling"/><category term="Programming Paradigms"/><category term="Queue"/><category term="Reading a binary file - Using read()"/><category term="Reading a complete file using the get()."/><category term="Stack"/><category term="Stack : Source Code"/><category term="Static"/><category term="Static and Dynamic Polymorphism"/><category term="String Comparison Using The &quot;==&quot; Operator"/><category term="String Concatenation Using + operator"/><category term="Types Of Inheritance"/><category term="Variable Rules"/><category term="What is Path"/><category term="Word Count using get()"/><category term="Writing a binary file"/><category term="Writing a file using put()"/><category term="Writing a string using put()"/><category term="Your First Java Program"/><category term="addition program"/><category term="constructor invocation in inheritance"/><category term="header files"/><category term="how to add in java."/><category term="java compiler"/><category term="javac"/><category term="pragma"/><category term="random access"/><category term="reading a file"/><category term="running a java program. Java"/><category term="using get() and put() at the same time."/><category term="void main"/><title type='text'>Programming For Freshers</title><subtitle type='html'>A site for programming students and teachers.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>138</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-1132662498568741561</id><published>2012-01-06T22:19:00.000-08:00</published><updated>2012-01-06T22:19:25.923-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basics of Java"/><category scheme="http://www.blogger.com/atom/ns#" term="How to create a Java Program"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Data Types"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Variables"/><title type='text'>Java Data Types</title><summary type="text">

Java Data Types
Integer
Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Width(in bits) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rangelong &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;64 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/1132662498568741561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2012/01/java-data-types.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/1132662498568741561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/1132662498568741561'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2012/01/java-data-types.html' title='Java Data Types'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-4262567158591947544</id><published>2012-01-02T09:14:00.000-08:00</published><updated>2012-01-02T09:14:47.924-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basics of Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Command Line Arguments"/><category scheme="http://www.blogger.com/atom/ns#" term="Passing Parameters"/><category scheme="http://www.blogger.com/atom/ns#" term="String args[]"/><title type='text'>Command Line Arguments</title><summary type="text">  Command Line ArgumentsThere are certain conditions where the user is required to pass arguments while running a program at the command line. For example, in DOS to delete a file we use the command “del filename” at the “C:” prompt and the specified file is deleted. In this case “del” is the command or the action that we want to perform and “filename” is known as the “Command Line Argument”. It </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/4262567158591947544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2012/01/command-line-arguments.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/4262567158591947544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/4262567158591947544'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2012/01/command-line-arguments.html' title='Command Line Arguments'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-5932872298892283766</id><published>2011-12-29T08:43:00.000-08:00</published><updated>2011-12-29T08:52:57.322-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="addition program"/><category scheme="http://www.blogger.com/atom/ns#" term="Basics of Java"/><category scheme="http://www.blogger.com/atom/ns#" term="how to add in java."/><category scheme="http://www.blogger.com/atom/ns#" term="Introduction to Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java first step"/><title type='text'>Basic Addition Program</title><summary type="text">Another Basic Example 
1. Open the editor, and type the following code


class prog2{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main(String args[])  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/5932872298892283766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/basic-addition-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/5932872298892283766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/5932872298892283766'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/basic-addition-program.html' title='Basic Addition Program'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-6488175504649546955</id><published>2011-12-27T21:30:00.000-08:00</published><updated>2011-12-27T21:30:08.435-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basics of Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Bytecode"/><category scheme="http://www.blogger.com/atom/ns#" term="How does it work ?"/><category scheme="http://www.blogger.com/atom/ns#" term="Introduction to Java"/><category scheme="http://www.blogger.com/atom/ns#" term="java compiler"/><category scheme="http://www.blogger.com/atom/ns#" term="javac"/><category scheme="http://www.blogger.com/atom/ns#" term="Static"/><category scheme="http://www.blogger.com/atom/ns#" term="String args[]"/><category scheme="http://www.blogger.com/atom/ns#" term="void main"/><title type='text'>How does it work ?</title><summary type="text">
How does it work ?Compiling the program :&amp;nbsp;To compile a program we have to use the statement&amp;nbsp;javac prog1.java&amp;nbsp;(where “prog1.java” is the name of the Java program)



Java Program Compilation Process
 This statement invokes the Java compiler, javac and compiles the program. As a result of this compilation a new file having the name “prog1.class” is created. This “.class” file has </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/6488175504649546955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/how-does-it-work.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/6488175504649546955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/6488175504649546955'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/how-does-it-work.html' title='How does it work ?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC4yufI9wFvGK9Ptv1T5FZuc3J9cNJIy2JaEox2ORiWqxsUpRMOXiQn40jSj8LPaJBjkRI0qNT_qNyu95DrlYb03bnIyYdmXba4OA219UT-wHsAgtCrGpzjpCLGD9RpnAWu_9H2ESuNR_P/s72-c/JavaCompileAndExec.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-5934007110314771358</id><published>2011-12-24T01:28:00.000-08:00</published><updated>2011-12-25T06:58:23.316-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="How to create a Java Program"/><category scheme="http://www.blogger.com/atom/ns#" term="Introduction to Java"/><category scheme="http://www.blogger.com/atom/ns#" term="running a java program. Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Your First Java Program"/><title type='text'>Your First Java Program</title><summary type="text">First Java Program - Using an Editor&amp;nbsp;
So you are ready to start with your first Java program. Here is a step by step procedure to create your first Java program in an editor.1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Verify the correct path of Java installation to see whether it is in C:, D: or any other drive. If you didn&#39;t play with the installation then by default Java will be installed at &quot;C:\Program </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/5934007110314771358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/your-first-java-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/5934007110314771358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/5934007110314771358'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/your-first-java-program.html' title='Your First Java Program'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-677141118221273064</id><published>2011-12-21T08:54:00.000-08:00</published><updated>2011-12-21T08:54:24.431-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Introduction to Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Path"/><category scheme="http://www.blogger.com/atom/ns#" term="What is Path"/><title type='text'>What is Path ?</title><summary type="text">PathIn&amp;nbsp;DOS&amp;nbsp;and&amp;nbsp;Windows&amp;nbsp;systems, a path is a list of&amp;nbsp;directories&amp;nbsp;where theoperating system&amp;nbsp;looks for&amp;nbsp;executable files&amp;nbsp;if it is unable to find the&amp;nbsp;file&amp;nbsp;in the&amp;nbsp;working directory. You can specify the list of directories with the PATH&amp;nbsp;command.&amp;nbsp;A path points to a file system location by following the directory tree hierarchy </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/677141118221273064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/what-is-path.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/677141118221273064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/677141118221273064'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/what-is-path.html' title='What is Path ?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-5857603528352770789</id><published>2011-12-20T08:14:00.000-08:00</published><updated>2011-12-20T08:14:52.125-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Advantages of an IDE"/><category scheme="http://www.blogger.com/atom/ns#" term="Disadvantages of an IDE"/><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="How to create a Java Program"/><category scheme="http://www.blogger.com/atom/ns#" term="IDE"/><category scheme="http://www.blogger.com/atom/ns#" term="NetBeans"/><title type='text'>How to create a Java Program</title><summary type="text">
How to create a Java Program :
There are two ways to create a Java program
1. Using a text editor : To create a Java application we can use any editor&amp;nbsp;and start typing the code. Since JDK does not contain an editor, the Windows users can use Notepad whereas the user of Linux can user Vi or any other editor. You can even download any third party editor from the internet. Some people may ask </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/5857603528352770789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/how-to-create-java-program.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/5857603528352770789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/5857603528352770789'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/how-to-create-java-program.html' title='How to create a Java Program'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-6418791378309064051</id><published>2011-12-15T03:38:00.000-08:00</published><updated>2011-12-15T03:38:49.229-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basics of Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Introduction to Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JVM"/><title type='text'>JVM</title><summary type="text">
At the heart of the Java platform lies the Java Virtual Machine, or JVM. Most programming languages compile source code directly into machine code, suitable for execution on a particular microprocessor architecture. The difference with Java is that it uses bytecode - a special type of machine code.&amp;nbsp;Java bytecode executes on a special type of microprocessor. Strangely enough, there wasn&#39;t a </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/6418791378309064051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/jvm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/6418791378309064051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/6418791378309064051'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/jvm.html' title='JVM'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoBK6dv-6DSG_IJRlhCqAq6_NZtF1W_xnA76_pww3OvmMjnNGFl3Da4_krrWlT9MXfZXU6Va3FlQabOEukq_sQpMiimAObU1Z0-qtoz00XltE8vUZX9hl_H-593WeR9jTDxM_nWMUm0yPt/s72-c/BYTECOD2.GIF" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-7758882498421153444</id><published>2011-12-13T23:48:00.000-08:00</published><updated>2011-12-13T23:48:28.249-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basics of Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Introduction to Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JRE"/><title type='text'>JRE</title><summary type="text">JRE
The Java Runtime Environment (JRE), also known as Java Runtime, is part of the Java Development Kit (JDK), a set of programming tools for developing&amp;nbsp;Java&amp;nbsp;applications. The Java Runtime Environment provides the minimum requirements for executing a Java application; it consists of the Java Virtual Machine (JVM), core classes, and supporting files.&amp;nbsp;The Java Runtime Environment (</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/7758882498421153444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/jre.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/7758882498421153444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/7758882498421153444'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/jre.html' title='JRE'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-5109459066003250779</id><published>2011-12-11T21:52:00.000-08:00</published><updated>2011-12-11T21:52:07.128-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basics of Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Introduction to Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JDK"/><title type='text'>JDK</title><summary type="text">What is JDK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Download JDK 
JDK stands for Java Development Kit. JDK is a set of tools that are used to create,test and debug a Java </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/5109459066003250779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/jdk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/5109459066003250779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/5109459066003250779'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/jdk.html' title='JDK'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfoT0jjfcuVvrV10djfm_avCxjzGMcKIMBj_mFBMA8rhuGPNds2_G3gHrfANdbSldZ7ejYtRCo4glvtDRitk1Unz2pMTf3SC5LXWVP8FR4O6IU5wKWxVBkp-h9Kn-2f1VTPA0i1Qu-8CRI/s72-c/java.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-4996687992540158471</id><published>2011-12-02T02:35:00.000-08:00</published><updated>2011-12-02T02:35:53.687-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basics of Java"/><category scheme="http://www.blogger.com/atom/ns#" term="History of Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Introduction to Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java first step"/><title type='text'>Java</title><summary type="text">  Introduction to Java
Java is a programming language originally developed by James Gosling at Sun Microsystems (now part of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems&#39; Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/4996687992540158471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/4996687992540158471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/4996687992540158471'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/12/java.html' title='Java'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkDYpeWRCdDtxASgWB07MakxPJXvEA1BfKyrDD9wgmdfUumiXn247kx83tT2xnDquD-PbB_PA0YIpA5-4fFkCWe7vYzZMgjCca8Krpg1qJYACggt7pFJC-yosX90YYzQBZ4hc4n4qo6Nrg/s72-c/java-logo.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-7178055814361568512</id><published>2011-11-30T21:40:00.000-08:00</published><updated>2011-11-30T21:40:52.800-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="career options in IT"/><category scheme="http://www.blogger.com/atom/ns#" term="IT Career"/><category scheme="http://www.blogger.com/atom/ns#" term="IT industry"/><title type='text'>IT industry</title><summary type="text">Wish to get into IT? Make sure you know the basics. Here’s what IT is all about:

What is information technology ?
The Information Technology industry is a large industry. Over the past 50 years, IT has shaped the modern world &amp;amp; continues to change it. 
The major segments in IT are hardware &amp;amp; software. Software consists of products &amp;amp; services. Software products are packaged or </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/7178055814361568512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/11/it-industry.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/7178055814361568512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/7178055814361568512'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/11/it-industry.html' title='IT industry'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtdnozeEPjEjHBhU980MR9tzU9jTbTaLNgfC4GAAIgHlCun61j9humuOcBV3Z-Iuwx3otA0nqX-FTkzFI-Mk_3y1AQVIIeiX22r6zlT2JwhUdsqBqsbPUWa5zm-4qMBxWz5f1fBxtDJ-xi/s72-c/tcs-infy-wipro-cts-satyam-logos.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-3872632013117920228</id><published>2011-11-29T21:23:00.000-08:00</published><updated>2011-11-29T21:27:23.320-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="career options in IT"/><category scheme="http://www.blogger.com/atom/ns#" term="IT job roles"/><category scheme="http://www.blogger.com/atom/ns#" term="IT jobs"/><title type='text'>IT job roles</title><summary type="text">Programmers

·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assist systems analysts in defining requirements of users of the proposed IT system.·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a detailed design for the proposed system.·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Translate specifications - for a software product or project - given by the systems analyst into lines </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/3872632013117920228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/11/it-job-roles.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/3872632013117920228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/3872632013117920228'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/11/it-job-roles.html' title='IT job roles'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCiNj79Kzh0uSLn9NdTTauZRu25YzJQS5zI51qM4PrGc1b00shXFwWEsKFMbXBXydVyFaiZez8erKu7D2T_BULdE2r2NMfCDepLtThOZEtNtr7b-W2VU76G1-44P9-xfHzWCTWg_77veva/s72-c/prog.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-4538723115555177760</id><published>2011-11-06T01:50:00.000-07:00</published><updated>2011-11-06T01:13:48.527-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Writing a binary file"/><title type='text'>Writing a Binary File - Using write()</title><summary type="text">Lets write a code to store some data in a file in binary mode using the write()
Example 1

#include &quot;iostream.h&quot;
#include &quot;fstream.h&quot;
#include &quot;conio.h&quot;
class person
{
&amp;nbsp;char name[10],addr[20];
&amp;nbsp;int age;
public:
&amp;nbsp;void getpers()
&amp;nbsp;{
&amp;nbsp;&amp;nbsp;cout&amp;lt;&amp;lt;&quot;\nEnter name : &quot;;
&amp;nbsp;&amp;nbsp;cin&amp;gt;&amp;gt;name;
&amp;nbsp;&amp;nbsp;cout&amp;lt;&amp;lt;&quot;\nEnter address : &quot;;
&amp;nbsp;&amp;nbsp;cin&amp;gt;&amp;gt;addr;
&amp;</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/4538723115555177760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/11/writing-binary-file-using-write.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/4538723115555177760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/4538723115555177760'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/11/writing-binary-file-using-write.html' title='Writing a Binary File - Using write()'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-7217638829054690194</id><published>2011-11-06T01:41:00.000-07:00</published><updated>2011-11-06T01:41:07.635-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Binary Files"/><category scheme="http://www.blogger.com/atom/ns#" term="File Handling"/><title type='text'>Binary Files</title><summary type="text">In the earlier posts, I wrote about handling text or character files. Now is the time to learn another type of file handling - Binary File Handling. 

&amp;nbsp;What is a Binary File
All the files that we use are not text or char files. We don&#39;t &quot;read&quot; all the files, some of them are &quot;heard&quot; or&amp;nbsp;&quot;viewed&quot;&amp;nbsp; also like audio, picture or video files. A char file is something that stores only char</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/7217638829054690194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/11/binary-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/7217638829054690194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/7217638829054690194'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/11/binary-files.html' title='Binary Files'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-4276335388093397212</id><published>2011-11-06T01:23:00.000-07:00</published><updated>2011-11-06T01:23:40.236-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Reading a binary file - Using read()"/><category scheme="http://www.blogger.com/atom/ns#" term="reading a file"/><title type='text'>Reading a binary file - Using read()</title><summary type="text">A file that has been created using binary functions like &quot;fwrite&quot; can only be read using the &quot;fread&quot; function that can read or process a binary file. Following is the same code that was given in the previous post &quot;Writing a binary file - Using write()&quot;. If you look at the end of the code you will see that there some additional statements there. 
Example 1

#include &quot;iostream.h&quot;
#include &quot;</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/4276335388093397212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/11/reading-binary-file-using-read.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/4276335388093397212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/4276335388093397212'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/11/reading-binary-file-using-read.html' title='Reading a binary file - Using read()'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-3307762234842848926</id><published>2011-10-20T04:13:00.000-07:00</published><updated>2011-10-20T04:13:29.515-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Copying a file"/><category scheme="http://www.blogger.com/atom/ns#" term="using get() and put() at the same time."/><title type='text'></title><summary type="text">
Copying a file 


To copy the contents of a file to another, we will use both get() and put() in the same code.&amp;nbsp;To make this program, we will open two files at the same time , the source file(the one that we want to copy) and the target file(the file that will contain the copied data). The source file will be opened in the&amp;nbsp;read mode(using ifstream) whereas the target file will be </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/3307762234842848926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/copying-file-to-copy-contents-of-file.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/3307762234842848926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/3307762234842848926'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/copying-file-to-copy-contents-of-file.html' title=''/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-647226349822740004</id><published>2011-10-20T03:55:00.000-07:00</published><updated>2011-10-20T03:55:51.692-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Reading a file using the get()."/><category scheme="http://www.blogger.com/atom/ns#" term="Word Count using get()"/><title type='text'>Word Count Program Using get()</title><summary type="text">
Using the get() we can easily write a program that can count the number of characters in a file. This will be quite similar to the Word Count option available in Ms-Word.




#include &quot;conio.h&quot;#include &quot;&amp;nbsp;ctype.h&quot; // for character functions#include &quot;iostream.h&quot;#include &quot;fstream.h&quot;void main(){&amp;nbsp;clrscr();&amp;nbsp;ifstream in(&quot;file1.txt&quot;); // name of any existing file&amp;nbsp;int chars=0,caps=0,</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/647226349822740004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/word-count-program-using-get.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/647226349822740004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/647226349822740004'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/word-count-program-using-get.html' title='Word Count Program Using get()'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-2260461129707430455</id><published>2011-10-18T23:22:00.000-07:00</published><updated>2011-10-18T23:22:52.123-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Reading a complete file using the get()."/><title type='text'>Reading a complete file using get()</title><summary type="text">
Reading the whole file using get()


The get() can not read more than one character at a time , therefore we must use a loop to read the file. The while loop is most suitable for reading a file since we don&#39;t know how much data is there in the file.

#include &quot;conio.h&quot;#include &quot;iostream.h&quot;#include &quot;fstream.h&quot;void main(){&amp;nbsp;clrscr();&amp;nbsp;ifstream in(&quot;file1.txt&quot;);&amp;nbsp;char c;&amp;nbsp;in.get(c);&amp;</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/2260461129707430455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/reading-complete-file-using-get.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/2260461129707430455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/2260461129707430455'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/reading-complete-file-using-get.html' title='Reading a complete file using get()'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-3789216018027417</id><published>2011-10-18T23:06:00.000-07:00</published><updated>2011-10-18T23:06:32.561-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Reading a file using the get()."/><title type='text'>Reading a file - char by char (using get())</title><summary type="text">

The get() function

The get() can read a char from a file. It is used when we want to read a single character from a file. To read all the data of a file, the same function can be enclosed inside a loop.

Syntax
ifstream.get(char);

Example : Lets see the following code snippet that makes use of the &quot;get()&quot; to read a char from the file. 

#include &quot;conio.h&quot;#include &quot;iostream.h&quot;#include &quot;</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/3789216018027417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/reading-file-char-by-char-using-get.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/3789216018027417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/3789216018027417'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/reading-file-char-by-char-using-get.html' title='Reading a file - char by char (using get())'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-3995378483467750082</id><published>2011-10-18T22:48:00.000-07:00</published><updated>2011-10-18T22:50:56.005-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="File Handling"/><category scheme="http://www.blogger.com/atom/ns#" term="Writing a string using put()"/><title type='text'>Writing a string using put()</title><summary type="text">
Using the put() to write a string


To write multiple characters in a file using the &quot;put()&quot;, we can use the function inside a loop.&amp;nbsp; Without a loop it is not possible to write a&amp;nbsp;complete string with put(), since the put() can not write more than one character at a time,

#include &quot;conio.h&quot;#include &quot;iostream.h&quot;#include &quot;fstream.h&quot;#include &quot;string.h&quot;void main(){&amp;nbsp;clrscr();&amp;nbsp;</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/3995378483467750082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/writing-string-using-put.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/3995378483467750082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/3995378483467750082'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/writing-string-using-put.html' title='Writing a string using put()'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-1762056910450445333</id><published>2011-10-18T22:33:00.000-07:00</published><updated>2011-10-18T22:35:53.345-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Writing a file using put()"/><title type='text'>Writing a file (char by char)</title><summary type="text">

To read a file one char at a time, we can use the &quot;put()&quot;. The put() writes a character to a file. To write multiple characters we can either use the put() inside a loop or we can use functions that read the data string by string.

Syntax
ofstream.put(char);

Example 1 : Lets see how the put() can be used to write a single character in the file.

#include &quot;conio.h&quot;#include &quot;fstream.h&quot;#include &quot;</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/1762056910450445333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/writing-file-char-by-char.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/1762056910450445333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/1762056910450445333'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/10/writing-file-char-by-char.html' title='Writing a file (char by char)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-7367279778980158655</id><published>2011-09-07T22:31:00.000-07:00</published><updated>2011-09-07T22:34:12.442-07:00</updated><title type='text'>Reading A File</title><summary type="text">Reading a file using the redirection operator &quot;&amp;gt;&amp;gt;&quot;


#include&amp;lt;iostream.h&amp;gt;
#include&amp;lt;conio.h&amp;gt;
#include&amp;lt;fstream.h&amp;gt;
void main()
{
ifstream in(&quot;data&quot;);
char name[20],addr[20];
in &amp;gt;&amp;gt;name&amp;gt;&amp;gt;addr;
cout&amp;lt;
in.close();
}

</summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/7367279778980158655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/09/reading-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/7367279778980158655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/7367279778980158655'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/09/reading-file.html' title='Reading A File'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-2292430212292130803</id><published>2011-08-26T02:58:00.000-07:00</published><updated>2011-09-07T22:23:56.225-07:00</updated><title type='text'>Writing a file</title><summary type="text">Program to store data in a file using the redirection operator &quot;&amp;lt;&amp;lt;&quot;
#include&amp;lt;iostream.h&amp;gt;
#include&amp;lt;conio.h&amp;gt;
#include&amp;lt;fstream.h&amp;gt;
void main()
{
 ofstream out(&quot;data&quot;); // creating a file in out(writing) mode.
 char name[20],addr[20];
 cout&amp;lt;&amp;lt;&quot;\nName : &quot;;
 cin&amp;gt;&amp;gt;name;
 cout&amp;lt;&amp;lt;&quot;\nAddress : &quot;;
 cin&amp;gt;&amp;gt;addr;
 out&amp;lt;&amp;lt;name&amp;lt;&amp;lt;&quot;\n&quot;&amp;lt;&amp;lt;addr;&amp;nbsp;// </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/2292430212292130803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/08/writing-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/2292430212292130803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/2292430212292130803'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/08/writing-file.html' title='Writing a file'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-762112826873555589.post-7343527238932290225</id><published>2011-08-24T22:34:00.000-07:00</published><updated>2011-08-24T22:34:14.151-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="File Handling"/><category scheme="http://www.blogger.com/atom/ns#" term="File Modes"/><title type='text'>File Modes</title><summary type="text">File Modes In C++


ModeDescription
ios::appIf FileName is a new file,            data is written to it.
If FileName already exists and contains data, then it is            opened, the compiler goes to the end of the file and adds the new            data to it.
ios::ateIf FileName is a new file,            data is written to it and subsequently added to the end of the file.
If FileName  </summary><link rel='replies' type='application/atom+xml' href='http://programmingforfreshers.blogspot.com/feeds/7343527238932290225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/08/file-modes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/7343527238932290225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/762112826873555589/posts/default/7343527238932290225'/><link rel='alternate' type='text/html' href='http://programmingforfreshers.blogspot.com/2011/08/file-modes.html' title='File Modes'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>