tag:blogger.com,1999:blog-73828114987055839392024-03-17T23:03:37.123-04:00PrayasPrayashttp://www.blogger.com/profile/15074412947707855399noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-7382811498705583939.post-27570828855961370082011-09-27T11:33:00.000-04:002014-11-27T11:44:12.987-05:00Introduction to Advance Java : An starter for Interviewes<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span>
<br />
<div class="MsoNormal" style="text-align: justify;">
<b><span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;">Introduction: <o:p></o:p></span></b><br />
<b><span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;"><br /></span></b></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;">This post will introduce the concept
of advance java classes. This post introduces several java classes which are
highly required during coding in JAVA programming language. This is the first
part of “Introduction to Advance JAVA”. This post will discuss the classes, its
details and a sample program that how to use these classes in JAVA code.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;">In this post we are talking
about Arrays, File Reader and Writer and a map interface classes. In coming
post we will be discussing several other useful classes like database connectivity,
transaction management classes and other important things.<o:p></o:p></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-family: Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: x-small;"><u><br /></u></span></span></div>
<div class="MsoNormal" style="margin-left: .25in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">1.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span></span></b><b><span style="color: black; font-family: Helvetica, sans-serif;">Arrays
Class</span></b><b><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></b></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black; font-family: 'Courier New';">Public class</span><span style="color: black; font-family: 'Courier New';"> </span><b><span style="color: black; font-family: Helvetica, sans-serif;">Arrays </span></b><span style="color: black; font-family: 'Courier New';">extends </span><span style="color: #333333; font-family: Helvetica, sans-serif;"><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class in java.lang"><span style="color: blue; font-family: 'Courier New';">Object</span></a></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;">This class contains various
methods for manipulating arrays (such as sorting and searching). This class
also contains a static factory that allows arrays to be viewed as lists. The
methods in this class all throw a <b>NullPointerException</b> if
the specified array reference is null, except where noted.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;">The documentation for the
methods contained in this class includes briefs description of the implementations.
Such descriptions should be regarded as implementation notes, rather than
parts of the specification. Implementers should feel free to substitute
other algorithms, so long as the specification itself is adhered to. (For
example, the algorithm used by sort (Object []) does not have to be a
merge sort, but it does have to be stable.) The following function definition
searches the specified array of bytes for the specified value using the binary
search algorithm.<o:p></o:p></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;">static int binarySearch(byte[] a, byte key)<br />
<br />
<o:p></o:p></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black; font-family: Helvetica, sans-serif;">The following program illustrates</span><span style="color: black; font-family: Helvetica, sans-serif;"> Array Class</span><span style="color: black; font-family: Helvetica, sans-serif;">
implementation.</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">import</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">java.util.Arrays;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">public</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> <b>class</b> </span><u><span style="color: #333333; font-family: 'Courier New';">ArrayInt</span></u><span style="color: #333333; font-family: Helvetica, sans-serif;"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">{</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black; font-family: 'Courier New';"> </span><span style="color: #333333; font-family: 'Courier New';"> </span><span style="color: #333333; font-family: 'Courier New';"> </span><b><span style="color: #333333; font-family: Helvetica, sans-serif;">public</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> <b>static</b> <b>void</b> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">main(String[]
args) {<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 13.5pt;">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">int</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;">[]
a1 =</span><span style="color: #333333; font-family: Helvetica, sans-serif;"> <b>new</b> <b>int</b></span><span style="color: #333333; font-family: Helvetica, sans-serif;">[]{4,3,5};<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 13.5pt;">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">int</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;">[]
a2 =</span><span style="color: #333333; font-family: Helvetica, sans-serif;"> <b>new</b> <b>int</b></span><span style="color: #333333; font-family: Helvetica, sans-serif;">[]{1,3,8,4,5,7};<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 13.5pt;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: 'Courier New';">
</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 13.5pt;">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">boolean</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">check=Arrays.</span><span style="color: #333333; font-family: 'Courier New';">equals</span><span style="color: #333333; font-family: Helvetica, sans-serif;">(a1,
a2);</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 13.5pt;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: Helvetica, sans-serif;">System.</span><i><span style="color: #333333; font-family: Helvetica, sans-serif;">out</span></i><span style="color: #333333; font-family: Helvetica, sans-serif;">.println(check);<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 13.5pt;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: Helvetica, sans-serif;">System.</span><i><span style="color: #333333; font-family: Helvetica, sans-serif;">out</span></i><span style="color: #333333; font-family: Helvetica, sans-serif;">.println("The Contents of the array are as follows");<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 13.5pt;">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">for</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;">(</span><b><span style="color: #333333; font-family: Helvetica, sans-serif;">float</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">i:a1){<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 13.5pt;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: Helvetica, sans-serif;">System.</span><i><span style="color: #333333; font-family: Helvetica, sans-serif;">out</span></i><span style="color: #333333; font-family: Helvetica, sans-serif;">.println("</span><span style="color: #333333; font-family: 'Courier New';"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">====== "</span><span style="color: #333333; font-family: Helvetica, sans-serif;">+i);<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;">}<o:p></o:p></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: 'Courier New';"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: Helvetica, sans-serif;">Arrays.</span><span style="color: #333333; font-family: 'Courier New';">sort</span><span style="color: #333333; font-family: Helvetica, sans-serif;">(a2);</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">for</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;">(</span><b><span style="color: #333333; font-family: Helvetica, sans-serif;">float</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">i:a2){<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: 'Courier New';"> </span><span style="color: #333333; font-family: 'Courier New';"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">}</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">int</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">index=Arrays.</span><span style="color: #333333; font-family: 'Courier New';">binarySearch</span><span style="color: #333333; font-family: Helvetica, sans-serif;">(a2,3);</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: Helvetica, sans-serif;">System.</span><i><span style="color: #333333; font-family: Helvetica, sans-serif;">out</span></i><span style="color: #333333; font-family: Helvetica, sans-serif;">.println("The
Index of the given names"+index);<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">int</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">index1=Arrays.</span><span style="color: #333333; font-family: 'Courier New';">binarySearch</span><span style="color: #333333; font-family: Helvetica, sans-serif;">(a2,9);</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: Helvetica, sans-serif;">System.</span><i><span style="color: #333333; font-family: Helvetica, sans-serif;">out</span></i><span style="color: #333333; font-family: Helvetica, sans-serif;">.println("Search
is not Successful"+index1);<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: Helvetica, sans-serif;">Arrays.</span><span style="color: #333333; font-family: 'Courier New';">fill</span><span style="color: #333333; font-family: Helvetica, sans-serif;">(a2,
4, 6,9);<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">for</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;">(</span><b><span style="color: #333333; font-family: Helvetica, sans-serif;">int</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;">i:a1){<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: #333333; font-family: Helvetica, sans-serif;"> System.</span><i><span style="color: #333333; font-family: Helvetica, sans-serif;">out</span></i><span style="color: #333333; font-family: Helvetica, sans-serif;">.println("</span><span style="color: #333333; font-family: 'Courier New';"> ##### </span><span style="color: #333333; font-family: Helvetica, sans-serif;">" + i);}<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;">}<o:p></o:p></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="margin-left: .25in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: black; font-family: Helvetica, sans-serif;">2.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span></span></b><b><span style="color: black; font-family: Helvetica, sans-serif;">File
Reader and File Writer<o:p></o:p></span></b></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><i><u><span style="color: black; font-family: Helvetica, sans-serif;">FileInputstream:</span></u></i><i><u><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></u></i></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black; font-family: Helvetica, sans-serif;">This class is a subclass of <b>Inputstream</b> class that reads <b>bytes</b> from a specified file name.
The read() method of this class reads a byte or array of bytes from the
file. It returns -1 when the end-of-file has been reached. We typically
use this class in conjunction with a <i><u>BufferedInputStream</u></i> and
<i><u>DataInputstream</u></i> class to
read binary data. To read text data, this class is used with an <i><u>InputStreamReader</u></i> and <i><u>BufferedReader</u></i> class. This
class <b>throwsFileNotFoundException</b>,
if the specified file is not exist. You can use the constructor of this stream
as below. </span><span style="color: black; font-family: Helvetica, sans-serif;">Sample
function signature is as below which should be used during coding</span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<i><span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;">FileInputstream (File filename);<o:p></o:p></span></i></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><i><u><span style="color: black; font-family: Helvetica, sans-serif;">FileOutputStream</span></u></i><span style="color: black; font-family: 'Courier New';">:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black; font-family: Helvetica, sans-serif;">This class is a subclass
of <b>OutputStream</b> that
writes data to a specified file name. The write() method of this
class writes a byte or array of bytes to the file. We typically use this class
in conjunction with a <b>BufferedOutputStream</b> and
a DataOutputStream class to write binary data. To write text, we
typically use it with a <i><u>PrintWriter</u></i>, <i><u>BufferedWriter</u></i> and an <b>OutputStreamWriter</b> class. You can
use the constructor of this stream as below. </span><span style="color: black; font-family: Helvetica, sans-serif;">Sample function signature is as below which
should be used during coding<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span class="Apple-style-span" style="font-size: x-small;"><i><span style="color: black; font-family: Helvetica, sans-serif;">FileOutputStream</span></i><i><span style="color: black; font-family: Helvetica, sans-serif;"> (File filename);<o:p></o:p></span></i></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">The following
program illustrates Reading data from the File and writes data into the file.</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<i><u><span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;">File Read Program<o:p></o:p></span></u></i></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;">import java.io.*;</span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">class
FileReaderDemo {</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">public static void
main(String args[]) throws Exception {</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
FileReader fr = new FileReader("out.txt");</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
BufferedReader br = new BufferedReader(fr);</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
String s;</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 27.0pt;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">while((s = br.readLine()) != null) {</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 27.0pt;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">System.out.println(s);</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .25in;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">}</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
fr.close();</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">}</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">}</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<i><u><span style="color: black; font-family: Helvetica, sans-serif; font-size: x-small;">File Write Program<o:p></o:p></span></u></i></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;">package
AdvancedIO;</span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">import java.io.*;</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">class FileWrite</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">{</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
public static void main(String args[])</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;"> {</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
try{</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
FileWriter fstream = new FileWriter("out.txt");</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
BufferedWriter out = new BufferedWriter(fstream);</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
out.write("Hello Java");</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
out.close();</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
}catch (Exception e){//Catch exception if any</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
System.err.println("Error: " + e.getMessage());</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">
}</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;"> }</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black;">}</span><span style="color: #333333; font-family: Helvetica, sans-serif;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;">
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 850px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 91.3pt;" valign="top" width="122"><div class="MsoNormal">
<b><span style="color: white;">Relevant AD<o:p></o:p></span></b></div>
</td>
<td style="background: yellow; border-left: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 398.75pt;" valign="top" width="532"><div class="MsoNormal">
<b><span style="color: #0f243e;">This ad may be
helpful, if relevant to your search.<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Add1 -->
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-0413634368644504" data-ad-slot="1876834640" style="display: inline-block; height: 90px; width: 728px;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</td>
</tr>
</tbody></table>
</span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="margin-left: .25in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: black; font-family: Helvetica, sans-serif;">3.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span></span></b><b><span style="color: black; font-family: Helvetica, sans-serif;">Map
Interface<o:p></o:p></span></b></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black; font-family: Helvetica, sans-serif;">The</span><span style="color: black; font-family: Helvetica, sans-serif;"> <b>HashMap </b></span><span style="color: black; font-family: Helvetica, sans-serif;">class uses a hash table to
implement the</span><span style="color: black; font-family: Helvetica, sans-serif;"> <b>Map </b></span><span style="color: black; font-family: Helvetica, sans-serif;">interface.
This allows the execution time of basic operations, such as</span><span style="color: black; font-family: Helvetica, sans-serif;"> <b>get() </b></span><span style="color: black; font-family: Helvetica, sans-serif;">and</span><span style="color: black; font-family: Helvetica, sans-serif;"> <b>put()</b></span><span style="color: black; font-family: Helvetica, sans-serif;">, to remain constant even for large sets.
The following constructors are defined:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black; font-family: Helvetica, sans-serif;">HashMap( )<br />
HashMap(Map</span><span style="color: black; font-family: Helvetica, sans-serif;"> <i>m</i></span><span style="color: black; font-family: Helvetica, sans-serif;">)<br />
HashMap(int</span><span style="color: black; font-family: Helvetica, sans-serif;"> <i>capacity</i></span><span style="color: black; font-family: Helvetica, sans-serif;">)<br />
HashMap(int</span><span style="color: black; font-family: Helvetica, sans-serif;"> <i>capacity</i></span><span style="color: black; font-family: Helvetica, sans-serif;">,
float</span><span style="color: black; font-family: Helvetica, sans-serif;"> <i>fillRatio</i></span><span style="color: black; font-family: Helvetica, sans-serif;">)<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: black; font-family: Helvetica, sans-serif;">HashMap </span></b><span style="color: black; font-family: Helvetica, sans-serif;">implements</span><span style="color: black; font-family: Helvetica, sans-serif;"> <b>Map </b></span><span style="color: black; font-family: Helvetica, sans-serif;">and extends</span><span style="color: black; font-family: Helvetica, sans-serif;"> <b>AbstractMap</b></span><span style="color: black; font-family: Helvetica, sans-serif;">. It does not add any methods
of its own. You should note that a hash map does</span><span style="color: black; font-family: Helvetica, sans-serif;"> <i>not </i></span><span style="color: black; font-family: Helvetica, sans-serif;">guarantee the order of its
elements. Therefore, the order in which elements are added to a hash map is not
necessarily the order in which they are read by an iterator. The following
program illustrates</span><span style="color: black; font-family: Helvetica, sans-serif;"> <b>HashMap</b></span><span style="color: black; font-family: Helvetica, sans-serif;">. It
maps names to account balances. Notice how a set-view is obtained and used.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">import</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> java.util.HashMap;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">import</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> <u>java.util.HashSet</u>;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">import</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> java.util.Iterator;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">import</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> java.util.Map;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">import</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> java.util.Set;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><b><span style="color: #333333; font-family: Helvetica, sans-serif;">public</span></b><span style="color: #333333; font-family: Helvetica, sans-serif;"> <b>class</b> MapExample {<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> <b>public</b> <b>static</b> <b>void</b> main(String[]
args) {<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> Map<Object,String>
mp=<b>new</b> HashMap<Object, String>();<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> mp.put(<b>new</b> Integer(2),
"100");<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> mp.put(<b>new</b> Integer(1),
"200");<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> mp.put(<b>new</b> Integer(3),
"300");<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> mp.put(<b>new</b> Integer(4),
"400");<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> mp.put(<b>new</b> Integer(7),
"777");<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> mp.put(<b>new</b> Integer(6),
"666");<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> mp.put(<b>new</b> Integer(5),
"333");<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> Set
s=mp.entrySet();<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> Iterator
it=s.iterator();<o:p></o:p></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><span style="color: black; font-family: Helvetica, sans-serif;"> </span><span style="color: #333333; font-family: Helvetica, sans-serif;"> while(it.hasNext())<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> Map.Entry
m =(<u>Map.Entry</u>)it.next();<o:p></o:p></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;">
// getKey is used to get key of Map<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> <b>int</b> key=(Integer)m.getKey();<o:p></o:p></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;">
// getValue is used to get value of key in Map<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> String
value=(String)m.getValue();<o:p></o:p></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> System.<i>out</i>.println("Key
:"+key+" Value :"+value);<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif; font-size: x-small;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-family: Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: x-small;">}</span><span class="Apple-style-span" style="font-size: 8.5pt;"><o:p></o:p></span></span></div>
</div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com76Atlanta, GA, USA33.7489954 -84.387982433.6433744 -84.5459109 33.8546164 -84.2300539tag:blogger.com,1999:blog-7382811498705583939.post-87075416291062591012011-09-23T17:37:00.002-04:002011-09-26T11:19:41.016-04:00Logitech Revue (Google TV) reveiw<div dir="ltr" style="text-align: left;" trbidi="on">
<b>Fast Track Summary</b><br />
Google TV is a great deal with the fact that it has very less price and nice integration with TV. You should try this. The important thing to note about Google TV is that it is best suited those who has Big Screen TV. The bigger the TV you have, the more enjoyment you will have using Google TV.<br />
<div>
<br /></div>
<b>Other Facts</b><br />
Few days back, I purchased the Logitech Revue ( Google TV) equipment and an HD capable Camera for video chatting.<br />
<br />
Price drop to $99 is an excellent reason to purchase Google TV. Wait, if you are interested in Video chatting, the Logitech is offering you an offer of$50 less price on its HD capable Camera. The whole deals come to only 199.98 $, saving of 50$ more, is another reason to buy this product.<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 850px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 91.3pt;" valign="top" width="122"><div class="MsoNormal">
<b><span style="color: white;">Relevant AD<o:p></o:p></span></b></div>
</td>
<td style="background: yellow; border-left: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 398.75pt;" valign="top" width="532"><div class="MsoNormal">
<b><span style="color: #0f243e;">This ad may be
helpful, if relevant to your search.<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<script type="text/javascript">
<!--
google_ad_client = "pub-0413634368644504";
/* 728x90, created 9/19/11 */
google_ad_slot = "4620530839";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
</div>
</td>
</tr>
</tbody></table>
<br />
<br />
I am a technical person (IT Guy) with s/w architecture and development experience and I am still testing these two products ( Google TV and web camera). Till now I am very happy that it works great on the TV.<br />
I am able to watch the cable/set top box programs and at the same time I can surf most of the internet based web sites.<br />
<br />
Its not amazing to know that several american web sites has already optimized their websites for easy viewing and reading the contents on a large screen TV, but the more important thing is that some web sites from India has already optimized their web sites for Google TV. The one I am using is www.raaga.com on my TV to listen the Hindi language songs. It works perfectly fine. I don't now need to open my computer to listed the song.<br />
<br />
I have purchased both only in $ 199.98 . No other charges at all. I am enjoying right now YouTube leanback, Video chatting and some Indian Channels who has already optimized their web site for Google TV viewing. One example is raaga.com.<br />
<br />
Some more technical review about Google TV can be found here.<br />
<a href="http://news.cnet.com/8301-17938_105-20019591-1.html?tag=contentMain;contentBody">What is Google TV -- Cnet's year review</a><br />
<a href="http://the-gadgeteer.com/2011/02/01/logitech-revue%E2%84%A2-with-google-tv%E2%84%A2-review/">Google TV -- how to set up</a><br />
<br />
<b>Google TV future expectations</b><br />
It is based on Android platform. Google is bringing the latest version of Android operatings system soon. This will allow the easy application development for Developer on Google TV platform. What does it means that we should be seeing and will be able to download a lot of useful applicaiton on Google TV. The future seems to be bright.<br />
<br />
Logitech Revue (Google TV) is an excellent product when compared to price, current features and most important when related to the expected growth (usability of this product) which is backed by Google.<br />
<br />
If two or three Google TV applications works great and seamlessly, it would be great for several users to buy this product. In coming weeks, I will write some more application specific details. Google TV has several application which may be an interest for someone to know that how it works. I will write a detailed review on Video Chatting (HD) software. I know that for the people,<br />
<br /></div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com12Atlanta, GA, USA33.7489954 -84.387982433.6433744 -84.5459109 33.8546164 -84.2300539tag:blogger.com,1999:blog-7382811498705583939.post-61876943818499528872011-09-21T17:45:00.001-04:002011-09-22T19:22:24.092-04:00C Language: Beginners’ Guide<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<div class="MsoListParagraph" data-mce-style="text-align: left; text-indent: -.25in; margin: 0 0 0 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-left: 48pt; text-align: justify; text-indent: -0.25in;">
<br /></div>
<address style="display: block; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0px 0px 1.62em;">
<b>Introduction</b></address>
<address style="display: block; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0px 0px 1.62em;">
The purpose of this post is to introduce elementary idea of C - Programming language to the readers. This post requires no earlier experience of any programming language.</address>
<address style="display: block; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0px 0px 1.62em;">
The post has been written keeping the audiences in mind who need to know what C programming language is and what are the different features available. It will help the elementary school students who need to prepare some type of reports for their annual/half-yearly report on a technical topic like this one.</address>
<address style="display: block; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0px 0px 1.62em;">
This post will try to highlight the basic features of C. The post is not trying to teach the basic working knowledge of this programming language.</address>
<address class="MsoListParagraph" style="display: block; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0px 0px 1.62em;">
<span data-mce-style="font: normal normal normal 7pt/normal 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"><span data-mce-style="font-family: 'Times New Roman', serif; font-size: x-small;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"></strong><span class="Apple-style-span" data-mce-style="line-height: 150%;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span></span></span><span class="Apple-style-span" data-mce-style="line-height: 22px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">1. Overview</span> <span data-mce-style="font-family: 'Times New Roman', serif; font-size: medium;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="Apple-style-span" data-mce-style="line-height: 150%;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;">of C</span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></span></address>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">C is a powerful structured programming language developed by Dennis Ritchie. It supports functions that enable easy maintainability of code, by breaking a large file<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />into smaller modules.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">2.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Program structure</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">A sample C Program template can be as simple as below. The famous “Hello World”<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />is the famous program among the people interested to learn this language.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
</div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">#include<stdio.h></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />main() </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{ </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> --other statements</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">3.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Header files</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">The files that are specified in the include section above, are called as header files. These are precompiled files that have several commonly used functions defined in these files. The functions available in the header files are used by a program by supplying few or no parameters.</span></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Like any other file, these header files contains an the file extension ‘.h’. The main program (not the header files) created in the C language are stored in the file system as physical file. These files must have a file name with file extension as ‘.c’. So if you see a file having an extension '.c' then you should understand that is program source code written in the C.</span></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">4</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">. Main function:</span></strong></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">There must be at least one function in any C source code. This is called as <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Main(</span>) and is a mandetory requirement of C language. This is the entry point of any C program.</span>From main() function the code execution flows as <span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px; line-height: 24px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">per the programmer’s chosen custom functions. There may or may not be other </span>functions written by user in a program.</div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">5. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">The First program: Famous “Hello World”</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48.25pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">#include<stdio.h></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48.25pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />main()</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48.25pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48.25pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“Hello”);</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48.25pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">return</span> 0;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48.25pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">This program prints Hello on the screen when we execute it.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">6. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Running a C Program</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">You need a C programming language compiler and the code editor at least. The famous ones are listed below</span></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66.25pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">If you are working on Windows Operating system, you can download either c-tool or the whole C IDE from the link below. IDE is a helpful set of tool where there is no need to shift between multiple windows during program developement.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66.25pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Turbo IDE: </span><a data-mce-href="http://www.sandroid.org/TurboC/" href="http://www.sandroid.org/TurboC/" style="color: #1b8be0; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; text-decoration: none;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">http://www.sandroid.org/TurboC/</span></a></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66.25pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Borland <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">IDE :</span> </span><a data-mce-href="http://www.borland.com" href="http://www.borland.com/" style="color: #1b8be0; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; text-decoration: none;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">http://www.borland.com</span></a></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66.25pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66.25pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">•</span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">If you are working on Linux Operating system, then you can download or configure the operating system components to include all the required C tools from the installation source like the DVD/CD.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66.25pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66.25pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">•</span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Type the above program and save it. With the help of whatever editor you are using compile the program – This will generate an exe file (executable). If you are using and IDE, it will automatically compile, link and run the program for you (actually the exe created out of compilation will run and not the .c file). The you can see the o/p in a blank screen (in most of IDE) whic is called as DOS command prompt.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">7. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Comments in C</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">C programming language provides two distinct type of code commenting options. Code commenting is required and considered as a very good habit for developers because it gives an adecaute logical information about a code section to the person who is reading for the first time.</span></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Single line comment</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif; background: yellow;" style="background-color: yellow; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">// </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">(double slash).</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Termination of comment is by pressing<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />enter key.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">•</span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Multi line comment looks like as below</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif; background: yellow;" style="background-color: yellow; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">/*</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">This is a comment to tell the reader that we can write multiline comments as in this section. More than one line commenting is possible in C just like these lines.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif; background: yellow;" style="background-color: yellow; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">*/</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 40.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 40.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Multiline comments helps expediting in writing comment which are more than a line.</span></div>
<div class="MsoNormal" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">8. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Data types in C</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Any programming language needs to deal with different type of data. C may be handling some mathematical calculation based code, which demands C to work with data like integer values, decimal values. At the same time C may be handling some description about a product details. In this case it will be handling data like customer name, product name, etc. These type of description is nothing but demands C to handle data which are charachter in nature. </span><span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px; line-height: 24px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">So C must have pre-defined </span><span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px; line-height: 24px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">type of data which it can handle. It has the following type of data defination standards i.e. data </span><span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px; line-height: 24px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">types.</span></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Primitive data types</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span></span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">, float, double, char.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Aggregate data types</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Arrays</strong> come under this category.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Arrays</strong> can contain a collection of int or float or char or double type of data.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">•</span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">User defined data types</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Instead of using the data types available in C, the developer can also define his/her own data type. This type of data is required when we need to store and manipulate the complex type of data, for example the student’s information.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Structures and <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">enum </span>data type fall under this category.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">9. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Variables:</span></strong></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Variables are the temporary place in the computer memory which actually <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">stores</span> the data (any type of data as defined in the above sections). The value in variables may change during the program execution life time,</span></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<br /></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">How to <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Declare</span> a variable</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <<Data type>> <<variable name>>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Example: </strong> <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span> a;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">How to <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Define </span>a variable</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <<<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">varname</span>>>=<<value>>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> a=10;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">How to use a variable</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <<<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">varname</span>>></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> a=a+1;//increments the value of a by 1.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> We can also declare and define a variable in single shot like this.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span></span> a=10;</span></div>
<div class="MsoNormal" data-mce-style="margin-bottom: .0001pt; text-align: justify; line-height: 150%;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="margin-bottom: .0001pt; line-height: 150%;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">10. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Variable names - Rules</span></strong><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Should not be a reserved word like <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">int</em></strong></span>, <strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">char</strong> etc.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Should start with a letter or an underscore (_).</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">•</span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Can contain letters, numbers or underscore.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">No other special characters are allowed including space.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Variable names are case-sensitive</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">A and <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">a</span> are different.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 102pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 102pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">11.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Input and Output</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Input</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1.5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1.5in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">scanf(“%d”,&a);</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1.5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1.5in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Gets an integer value from the user and stores it under the name “a”</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Output</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1.5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1.5in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(“%d”,a);</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1.5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1.5in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">– </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Prints the value present in variable on the screen.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 1.5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1.5in; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="margin-bottom: .0001pt; text-align: justify; line-height: 150%;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; text-align: justify;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="line-height: 150%; font-family: 'Times New Roman',serif; font-size: 12pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> Format specifier</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">%d is the format specifier. This informs to the compiler that the incoming value is an integer value.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1in; text-align: justify; text-indent: -0.25in;">
• <span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px; line-height: 24px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Other data types can be specified as </span>follows:</div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">%c – character</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">%f – float</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">%lf – double</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">%s – character array (string)</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 1in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1in; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Printf and scanf are defined under the header file stdio.h</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 1in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 1in; text-align: justify;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">12.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">For loops</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">For</strong> loop is used when a set of work has to be repeated multiple time. </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">The syntax of<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">for</strong> loop is below</span></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">for </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">(<span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">initialisation;condition</span> <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">checking;increment</span>)</span></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> {<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"></strong></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .75in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.75in; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">set</span> of statements</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .75in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.75in; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .75in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.75in; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />A Program which print Hello 10 times can be similar like one below.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .75in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.75in; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">for(</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">I=0;I<10;I++)</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .75in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.75in; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .75in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.75in; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“Hello”);</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .75in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.75in; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .75in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.75in; text-align: justify;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">13.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">While loop</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="margin-bottom: .0001pt; line-height: 150%; padding-left: 60px;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; padding-left: 60px;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> The <strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">while</strong> loop is used to perform some set of tasks which need to be repeated until the parent condition holds true. The syntax for while loop,</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">while(</span></span><span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">condn</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">)</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">statements</em></strong></span>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Eg:</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> a=10;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">while(</span>a !=<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />0) </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> {</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,a);</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> a--;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> }</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Output:<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />10987654321</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">14.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Do While loop</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="margin-bottom: .0001pt; line-height: 150%; padding-left: 60px;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; padding-left: 60px;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">The <strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">do while</em></strong> is similar to the <strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">while </em></strong>loop except that predecided set of task is performed without checking any condition for the first time. The syntax of <strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">do while</em></strong>loop is described below.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">do</span></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">set</span> of<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />statements</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}while</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">(condn);</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Eg:</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">i=10; </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">do</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,i);</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">i--</span>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}while</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">(i!=0)</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; padding-left: 30px; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Output:<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />10987654321</span></div>
<div class="MsoNormal" data-mce-style="margin-bottom: .0001pt; text-align: justify; line-height: 150%; padding-left: 30px;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"> While</strong> – Entry controlled loop. </span><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Do </strong><span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px; line-height: 24px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">While</strong> – Exit controlled loop.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; text-align: justify;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">15.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Conditional statements</span></strong><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">If you want to do some set of task only once but again based on some condition which hold true, then use the <strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">IF </em></strong>statement as illustrated below.</span></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">if</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />(condition) </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">stmt</span> 1; //Executes if Condition is true.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">else</span></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">stmt</span> 2; //Executes if condition is false.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">switch(</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">var) </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">case</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />1: //if var=1 this case executes.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">stmt</span>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">break</span>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">case</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />2: //if var=2 this case executes.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">stmt</span>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">break</span>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">default</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">: //if var is something else this will<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />execute.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">stmt</span>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">16. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Operators:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Arithmetic (+,-,*<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">,/</span>,%).</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Relational (<,><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">,<</span>=,>=,==,!=).</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Logical (&&<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">,|</span>|,!).</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Bitwise (&,|).</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Assignment (=).</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Compound assignment (+=,*=,-=<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">,/</span>=,%=,&=,|=).</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Shift (right shift >>, left shift <<).</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">17.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">String functions</span></strong><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">strlen(</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">str) – To find length of string str .</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">•</span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> </span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">strrev(</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">str) – Reverses the string str as rts .</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">strcat(</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">str1,str2) – Appends str2 to str1 and returns str1.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">strcpy(</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">st1,st2) – copies the content of st2 to st1.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">strcmp(</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">s1,s2) – Compares the two string s1 and s2.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">strcmpi(</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">s1,s2) – Case insensitive comparison of strings.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> String.h h</span><span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px; line-height: 24px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">eader </span><span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px; line-height: 24px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">file must be included before any of the above string functions is used in the code.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">18.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Numeric functions</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">pow(</span>n,x) – evaluates n^x.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">ceil(1.3) – Returns 2</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">floor(1.3) – Returns 1</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">abs(num) – Returns absolute value</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">log(x) - Logarithmic value</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">sin(x) </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
• <span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px; line-height: 24px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">cos(x)</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">tan(x)</span></div>
<div class="MsoNormal" data-mce-style="margin-bottom: .0001pt; text-align: justify; line-height: 150%; padding-left: 60px;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; padding-left: 60px; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Header file</span> to be included math.h</span></div>
<div class="MsoNormal" data-mce-style="margin-bottom: .0001pt; text-align: justify; line-height: 150%;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">19.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Procedures</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Procedure is a function whose return type is void.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Functions will have return types int, char, <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">double</span>, float or even structs and arrays.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Return type is the data type of the value that is returned to the calling point after the called function execution completes.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">20. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Functions and <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Parameters<span data-mce-style="font-weight: normal;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></span></span></strong></div>
<div class="MsoListParagraphCxSpMiddle" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Functions are the small unit of a program which has some set of instruction which needs to be done as a single unit of work. Each function can do its pre-decided work based on some value which is passed to it. The values which are passed to the function called as parameters. Find below some illustrations as below.</span></div>
<div class="MsoListParagraphCxSpLast" data-mce-style="line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Declaration<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />section</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><<Returntype>><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" /><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">funname(</span>parameter list);</span></em></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Definition<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />section</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><<Returntype>><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" /><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">funname(</span>parameter list)</span></em></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></em></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">body</span> of the<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />function</span></em></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></em></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Function<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />Call</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Funname</span></em></span></span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">(</span></em></span><em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">parameter);</span></em></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Example<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />function<em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"></em></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">#include<stdio.h></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">void</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />fun(int a); //declaration.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />main()</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">fun(</span>10); //Call.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">} </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">void</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />fun(int x) //definition.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,x); </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">21.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Actual and Formal parameters</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Actual parameters are those that are used during a function call.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Formal parameters are those that are used in function definition and function declaration.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">22. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Arrays:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Arrays fall under aggregate data type.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Aggregate – More than 1.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Arrays are collection of data that belong to same data type.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Arrays are collection of homogeneous data.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Array elements can be accessed by its position in the array called as index.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Array index starts with zero. </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">The last index in an array is num – 1 where num is the no of elements in <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">a</span> array.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">a[5] is an array that stores 5 integers.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">a[</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">0] is the first element where as a[4] is the fifth element.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">We can also have arrays with more than one dimension.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">float </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">a[5][5] is a two-dimensional array. It can store 5x5 = 25 floating point<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />numbers.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">The bounds are <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">a[</span>0][0] to a[4][4].</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">23.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Structures </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Structures are user defined data types.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">It is a collection of heterogeneous data.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">It can have integer, float, double or character data in it.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">We can also have array of structures. </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">struct</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" /><<structname>></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">members</span>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}element</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">We can access element.members;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">struct</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />Person</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">id;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">char </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">name[5];</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}P1</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">P1.id = 1;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">P1.name = “vasu”;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">For assigning more values we need to create an array of structure element like this</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Struct<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />Person</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Int id;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Char <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">name[</span>5];</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}P</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">[10];</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">P[</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">0].id = 1;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">P[</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">0].name = “saran”;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">P[</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">1].id = 2;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">P[</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">1].name = “arya”;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">And<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />so on till <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">P[</span>9].</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 67.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 67.5pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">24. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Type def:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">The <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">typedef</span> operator is used for creating alias of a data type. For example I have this statement, I can use integer in place of <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span></span><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">i.e</span></span> instead of declaring <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span> a;, I can use integer a; This is applied for structures too. </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">typedef </span></span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span> integer;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">typedef </span><span class="Apple-style-span" data-mce-style="line-height: 22px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;">struct student</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">id;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Char <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">name[</span>10];</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}s</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Now I can put</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">s </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">s1,s2;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Instead of <span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">struct</span> student s1<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">,s2</span>; //In case typedef is missed in struct definition as below</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span class="SpellE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">struct </span></span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">student</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">id;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">char </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">name[10];</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">};</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 30pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 30pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">25.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Pointers</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> Pointer is a special variable that stores address of another variable. Addresses are<br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />integers. Hence pointer stores integer data. Size of pointer = size of int.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Pointer that stores address of integer variable is called as integer pointer and is declared as int *ip;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Examples</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">a;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">a=10; //a stores 10</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">*ip ;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">ip </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">= &a; //ip stores address of a (say 1000)</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">ip</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> : fetches 1000</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">*ip : fetches 10</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 49.5pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 49.5pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">* Is called as dereferencing operator</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">26.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Call by Value</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Calling a function with parameters passed as values</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">a=10; </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">void fun(int a)</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">fun(</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">a); {</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">defn</span>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> }</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Here <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">fun(</span>a) is a call by value. </span>Any change done with in the function is local to it and will not be effected <span class="Apple-style-span" data-mce-style="font-family: 'Times New Roman', serif; font-size: 16px; line-height: 24px;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">outside the function. </span></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">27.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Call by reference</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Calling a function by passing pointers as parameters (address of variables is passed instead of variables).</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">int </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">a=1; </span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">void fun(int *x)</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">fun(</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">&a); {</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">defn</span>;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> }</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Any change done to variable a will affect outside the function also.</span></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 66pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 66pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">28. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Example program – Call by value:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">#include<stdio.h></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">void</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />main()</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span> a=10;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,a); a=10</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">fun(</span>a);</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,a); a=10</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">void </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">fun(int x)</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,x) x=10</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">x</span>++;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,x); x=11</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 63pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 63pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: Symbol;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Explanation</span></div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<a data-mce-href="http://prayasek.files.wordpress.com/2011/08/pointer-illustration-1.jpg" href="http://prayasek.files.wordpress.com/2011/08/pointer-illustration-1.jpg" style="color: #1b8be0; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; text-decoration: none;"><img alt="c pointer" class="aligncenter size-full wp-image-290" data-mce-src="http://prayasek.files.wordpress.com/2011/08/pointer-illustration-1.jpg" height="217" src="http://prayasek.files.wordpress.com/2011/08/pointer-illustration-1.jpg" style="border: 1px solid rgb(221, 221, 221); clear: both; display: block; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; height: auto; margin: 0.4em auto 1.62em; max-width: 97.5%; padding: 6px; width: auto;" title="c pointer illustration - 1" width="306" /></a></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt .5in;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 0.5in; text-align: justify;">
<br /></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">29.<span data-mce-style="font: 7pt 'Times New Roman';" style="font-size-adjust: none; font-stretch: normal; font: 7pt/1.625 "Times New Roman";"> </span></span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Example Program – Call by reference</span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">#include<stdio.h></span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">void</span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"><br style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;" />main()</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">int</span> a=10;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,a); a=10</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">fun(</span>a);</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,a); a=11</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">void </span></span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">fun(int x)</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">{</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,x) x=10</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">x</span>++;</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;"> <span class="GramE" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">printf(</span>“%d”,x); x=11</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">}</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" data-mce-style="text-align: justify; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Explanation</span></div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<a data-mce-href="http://prayasek.files.wordpress.com/2011/08/pointer-illustration-2.jpg" href="http://prayasek.files.wordpress.com/2011/08/pointer-illustration-2.jpg" style="color: #1b8be0; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; text-decoration: none;"><img alt="c pointer illustration" class="aligncenter size-full wp-image-291" data-mce-src="http://prayasek.files.wordpress.com/2011/08/pointer-illustration-2.jpg" height="217" src="http://prayasek.files.wordpress.com/2011/08/pointer-illustration-2.jpg" style="border: 1px solid rgb(221, 221, 221); clear: both; display: block; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; height: auto; margin: 0.4em auto 1.62em; max-width: 97.5%; padding: 6px; width: auto;" title="C Pointer illustration - 2" width="306" /></a></div>
<div class="MsoListParagraph" data-mce-style="text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-indent: -0.25in;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">30. </span></strong><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span data-mce-style="font-size: 14pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/28px "Helvetica Neue", Helvetica, Arial, sans-serif;">Conclusion:</span></strong></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Call by value: Copying value of variable in another variable. So any change made in the copy will not affect the original place.</span></div>
<div class="MsoNormal" data-mce-style="text-align: justify; text-indent: -.25in; line-height: 150%; margin: 0 0 .0001pt 48pt;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; margin-left: 48pt; text-align: justify; text-indent: -0.25in;">
<span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">• </span><span data-mce-style="font-size: 12pt; line-height: 150%; font-family: 'Times New Roman',serif;" style="font-size-adjust: none; font-stretch: normal; font: 15px/24px "Helvetica Neue", Helvetica, Arial, sans-serif;">Call by reference: Creating link for the parameter to the original location. Since the address is same, changes to the parameter will refer to original location and the value will be over written.</span></div>
<div class="MsoNormal" data-mce-style="margin-bottom: .0001pt; text-align: justify; line-height: 150%;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; text-align: justify;">
.</div>
<div class="MsoNormal" data-mce-style="margin-bottom: .0001pt; text-align: justify; line-height: 150%;" style="font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 0pt; text-align: justify;">
<span data-mce-style="font-family: 'Times New Roman', serif; font-size: small;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><span class="Apple-style-span" data-mce-style="line-height: 150%;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;">[About the Author: Pratima Gutal is an engineering student in the IT department of College of Engineering Pandharpur, </span>Maharashtra<span class="Apple-style-span" data-mce-style="line-height: 150%;" style="color: #00e000; font-size-adjust: none; font-stretch: normal; font: 15px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;">, India. Contact Pratima at her email-id pratima.gutal@gmail.com. If you have any concern, question or objection about this article please feel free to contact her.]</span></span></div>
</div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com34Pandharpur, Maharashtra, India17.675128 75.32677217.64487 75.28729 17.705386 75.366254000000012tag:blogger.com,1999:blog-7382811498705583939.post-12560879715108257192011-09-20T16:22:00.001-04:002011-09-20T17:00:52.061-04:00Cloud Computing: A paradigm shift<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<b>What is Cloud Computing?</b><br />
Cloud computing is all about taking care of scalability and availability of a software application by providing highest level performance and security from application architecture perspective. There are several cloud providers in the market. The one famous and rapidly growing are Microsoft, Google and IBM.</div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>How cloud is changing the current market and technology development?</b></span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"></strong><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"></strong>From developers’ perspective cloud computing is nothing but coding and deploying an application on a shared location which may be outside of your company. The shared location may be from Google, IBM, Microsoft, TCS, Infosys or other Cloud providers. This shared location consists of very huge set of hardware, software and system software to dynamically manages these set of h/w and s/w across the multiple client applications based on different set of predefined criteria. The cloud internally is nothing but shared infrastructure of hardware and software.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 850px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 91.3pt;" valign="top" width="122"><div class="MsoNormal">
<b><span style="color: white;">Relevant AD<o:p></o:p></span></b></div>
</td>
<td style="background: yellow; border-left: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 398.75pt;" valign="top" width="532"><div class="MsoNormal">
<b><span style="color: #0f243e;">This ad may be
helpful, if relevant to your search.<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<script type="text/javascript">
<!--
google_ad_client = "pub-0413634368644504";
/* 728x90, created 9/19/11 */
google_ad_slot = "4620530839";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
</div>
</td>
</tr>
</tbody></table>
</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
The cloud providers take care of the application’s ever increasing load and/or space requirement and automatically adjust the RAM, processing power, space required running the application smoothly. It main aim to provides good response time to the end users.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">1. </strong>We should understand that what it takes/means/required from an application point of view, so that we will be able to migrated an application from a dedicated hosted environment to a cloud infrastructure. We must consider the benefit and shortfall before choosing the migration from a dedicated (company's internal environment) to a cloud hosting provider.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">2. </strong>We should be able to dig dip into application/s prescribed to a standard set of architecture need of a banking client so that we will be able to size the amount of work that needs before we can deploy the application on the cloud. The amount of work will actually be key point to reach at decision of choose a cloud services or not.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">3. </strong>We should understand what it will take to architect applications that can run on the cloud to optimally use the cloud infrastructure.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">4. </strong>We should also understand and get the result that what cloud cannot be solving (in its current form). This will make sure that we do not mess up as cloud zealots. It will keep us ready to take right decision when time demands for a cloud change.</div>
<div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 750 px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 654px;" valign="top"><div class="MsoNormal">
<b><span style="color: white;">Search Relevant Contents<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<style type="text/css">
@import url(http://www.google.com/cse/api/branding.css);
</style>
<br />
<div class="cse-branding-right" style="background-color: white; color: black;">
<div class="cse-branding-form">
<form action="http://techupdate.prayas.info" id="cse-search-box">
<div>
<input name="cx" type="hidden" value="partner-pub-0413634368644504:ndlxt6o2t86" />
<input name="cof" type="hidden" value="FORID:10" />
<input name="ie" type="hidden" value="ISO-8859-1" />
<input name="q" size="132" type="text" />
<input name="sa" type="submit" value="Search" />
</div>
</form>
</div>
<div class="cse-branding-logo">
<img alt="Google" src="http://www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif" />
</div>
<div class="cse-branding-text">
Custom Search
</div>
</div>
</div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<div id="cse-search-results">
</div>
<script type="text/javascript">
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchFrameWidth = 800;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";
</script>
<script src="http://www.google.com/afsonline/show_afs_search.js" type="text/javascript">
</script>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com22tag:blogger.com,1999:blog-7382811498705583939.post-56492588411934193462011-09-20T10:54:00.001-04:002011-09-21T17:50:56.581-04:00.Net Sessions in Load Balanced WebFarms<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>Introduction</b></span><br />
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"></strong>This document is aimed to write some fact about session issue in Clustering scenario. Web cluster is mostly implemented using web-farms. The following facts are based on the project based experiences which author has gained.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>1. Session Issue</b></span><br />
Session can not be managed in a web farm implementation because the load balancer can route the traffic from the same requester to another web server based on several criteria. Few criteria are web/app server's current load, amount of memory remaining, etc.<br />
The moment second or subsequent web page request is routed to another web server by the load balance server (e.x - F5) , your site will stop working and your data may be lost.</div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
</div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>Find below some facts</b></span><br />
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>1</b></span>. In Web Farm, there are at least following servers.<br />
Once load balancer<br />
Two or more Web Servers<br />
Once or more App Servers<br />
One or more database servers</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>2</b></span>. By default, in a load-balanced web farm implementation, it is not guaranteed that request from the same client will always be severed by the same web server from the Farm. It happens due the fact that the request can be routed to any available web server by the load balancer. F5 is an example of good load balance server. This is heavenly used by clients who has very sensitive type of data, like Banking Clients.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>3</b></span>. In this case, the server sessions which were created and stored on web server will not be available to another web server, if the same user requests/submits a web page and he will get error.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>4</b></span>. So in web farm implementation, server-based session concepts can not be used without any special arrangements.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>5</b></span>. Though in several organization, for web farm implementation, the default configuration of load balancer is such a ways that the load balance always sent the client request to the same web server for first 300 seconds from the time of first request. Several Banking clients keeps this setting as it is. Note that is a very important concept to remember. It can solve a lot of issues after your first time deployment of any code in production.<br />
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><br /></strong></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 850px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 91.3pt;" valign="top" width="122"><div class="MsoNormal">
<b><span style="color: white;">Relevant AD<o:p></o:p></span></b></div>
</td>
<td style="background: yellow; border-left: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 398.75pt;" valign="top" width="532"><div class="MsoNormal">
<b><span style="color: #0f243e;">This ad may be
helpful, if relevant to your search.<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<script type="text/javascript">
<!--
google_ad_client = "pub-0413634368644504";
/* 728x90, created 9/19/11 */
google_ad_slot = "4620530839";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
</div>
</td>
</tr>
</tbody></table>
<br />
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><br /></strong></div>
<div data-mce-style="text-align: justify;" style="font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<i><b><span style="font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Alternatives: .Net web in LoadBalanced scenario in Web-farm </span><span style="font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Implementation</span></b></i></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b><span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="color: #000000; text-decoration: underline;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Option A : </span></span><span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"> </span><span data-mce-style="color: #000000; text-decoration: underline;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Session State alternatives (changes at code level)</span></span></b></span></div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">1.</span> <span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri;" style="font-family: Calibri; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Use Cookies to preserve data between different calls.</span></span></strong></div>
<div data-mce-style="padding-left: 30px; text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; padding-left: 30px; text-align: justify;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"></strong><span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">a.</span> <span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Cookies are more scalable option than using sessions. Since all data are stored on client machine, memory on server remains free for other tasks. Instead of spending server resources like memory or database, ASP.NET will distribute data to visitors' computers.</span></div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">2.</span> <span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri;" style="font-family: Calibri; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">ASP.NET ViewState</span></span></strong></div>
<div data-mce-style="padding-left: 30px; text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; padding-left: 30px; text-align: justify;">
<span class="Apple-style-span" data-mce-style="color: #000000;" style="color: black; font-style: inherit; font-weight: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">a. ASP.NET ViewState state stores information in page's HTML code, as hidden field named __VIEWSTATE. ViewState is also very scalable solution. Like in case when using cookies, information are stored on client side and don't load on server.</span></div>
<div data-mce-style="padding-left: 30px; text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; padding-left: 30px; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">b. Unlike Session state, ViewState is designed to preserve data between post backs on same page. You can't, at least by default, send data between pages using ViewState. There are some workarounds, you can, for example place some data to ViewState and then use Server.Transfer to load the second page. In this case, ViewState variables will be visible on second page so you practically transferred data between different pages using ViewState</span></div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">3.</span> <span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri;" style="font-family: Calibri; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Use hidden fields</span></span></strong></div>
<div data-mce-style="padding-left: 30px; text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; padding-left: 30px; text-align: justify;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"></strong><span class="Apple-style-span" data-mce-style="color: #000000;" style="color: black; font-style: inherit; font-weight: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">a. You can place standard HiddenField control on web form and use its Value property to store user's data</span></div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">4.</span> <span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri;" style="font-family: Calibri; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Query strings</span></span></strong></div>
<div data-mce-style="padding-left: 30px; text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; padding-left: 30px; text-align: justify;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"></strong><span class="Apple-style-span" data-mce-style="color: #000000;" style="color: black; font-style: inherit; font-weight: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">a. Query strings were common option to send data between pages. Even ASP.NET session state uses query string variable in URL if Cookieless parameter is set to true. So, query strings work if user is disabled cookies in browser.</span></div>
<div data-mce-style="padding-left: 30px; text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; padding-left: 30px; text-align: justify;">
<span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">b.</span> <span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Disadvantage of query strings is that you can't transfer a lot of data on this way. I think your application uses session to temporarily store preventative data type and hence Query string is suitable option for you.</span></div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">5.</span> <span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri;" style="font-family: Calibri; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Profile properties</span></span></strong></div>
<div data-mce-style="padding-left: 30px; text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; padding-left: 30px; text-align: justify;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"></strong><span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">a.</span> <span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Profile data remains after visitor leaves website and session expires. Because data are stored in Sql Server database by default, they are not affected on ASP.NET restart or even IIS restart.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span class="Apple-style-span" data-mce-style="color: #000000;" style="color: black; font-style: inherit; font-weight: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Note</strong>: If your application needs to persist some sensitive date across multiple page loads, even session variables are not all a secure mechanism to store these data because several viral or trojan attack can read this session data from server’s memory. The most reliable way to keep user's information across sessions is to store them to database on server. You can do it manually, but it is usually more efficient to use Profile properties.</span></div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<br />
<span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"><span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="color: #000000; text-decoration: underline;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"><b>Option B : Change at Infrastructure level</b></span></span></span></div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">1.</span> </strong><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri;" style="font-family: Calibri; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">New SQL Session state sever</span></span><br />
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri; font-size: small;" style="font-family: Calibri; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">2.</span> </strong><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Calibri;" style="font-family: Calibri; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">New ASP.Net Out Proc Server</span></span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
For both of the above, the network/server engineer must have one more/shared computer hardware which will serve as common location to store sessions of each web server present in the web farm. I think we don’t have this kind of infrastructure setup either in QA or Production environment as of now. If needed , it will take a lot of time and money and of course several level of approvals.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span class="Apple-style-span" data-mce-style="color: #000000;" style="color: black; font-style: inherit; font-weight: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Conclusion</span></strong><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"> : </strong>I have generally seen (where sticky session is not enable on load balancer) that Option A.2, A.3 and A.4 are used simultaneously across the whole application starting right from coding.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<em style="font-style: italic; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"><span data-mce-style="color: #000000; text-decoration: underline;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Did you like this post ? Do leave a comment or share with your Facebook friends. This will give me more reasons to write such posts.</span></span></em></div>
<div>
<em style="font-style: italic; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"><span data-mce-style="color: #000000; text-decoration: underline;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"><br /></span></span></em></div>
</div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com7tag:blogger.com,1999:blog-7382811498705583939.post-8601137748952493962011-09-18T17:14:00.001-04:002011-09-19T11:42:16.551-04:00Key factors to increase the efficiency and output of an Industrial Process: A Work Study.<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 data-mce-style="text-align: justify;" style="text-align: justify;">
Introduction</h1>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
Now a days every organization gives emphasis on having its work done in a very efficient and effective way. The way the work gets completed and the efforts taken, plays a very crucial role in determining the success of any organization or for any industrial engineering product in the market and creating its impact on the customers to sustain in the market. This leads to the <strong>development of ‘Work Study’.</strong> The various aspects of work study has been discussed below in the following post.</div>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
<br /></div>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
<img alt="" class="mceWPmore mceItemNoResize" data-mce-src="http://prayasek.wordpress.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" src="http://prayasek.wordpress.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" title="More..." /></div>
<h1 data-mce-style="text-align: justify;" style="text-align: justify;">
Work Study</h1>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
Work study is defined as the systematic study to find out one of the best ways of doing any work by investigation and analysis of all details about the work as per established standard. The British Standard Institution (BSI) defines work study as, “The technique which is partly concerned with method study and work measurement, which are used in the examination of human work in all aspects”. For more details on British Standard Institute and its process, click <a data-mce-href="http://www.bsigroup.com/" href="http://www.bsigroup.com/"><span style="color: #1b8be0;">here</span></a>.</div>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
<br />
The various study done related with the work and the many amount of investigations carried out gives a wider knowledge about the requirement of the work and leads to invention of various new and creative ideas and processes to get the work completed in a reduced amount of time.</div>
<a data-mce-href="http://industrialengineering.wikia.com/wiki/WorkStudy" href="http://industrialengineering.wikia.com/wiki/WorkStudy"><span style="color: #1b8be0;">WikiPedia Work Document details</span></a><br />
<span style="color: #1b8be0;"><a data-mce-href="http://www.productivity.in/knowledgebase/Industrial%20Engineering%20Docs/b.%20Methods%20Engineering/2.1%20Work%20Study.pdf" href="http://www.productivity.in/knowledgebase/Industrial%20Engineering%20Docs/b.%20Methods%20Engineering/2.1%20Work%20Study.pdf">Industrial Engineering Work Study Document</a></span><br />
<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 850px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 91.3pt;" valign="top" width="122"><div class="MsoNormal">
<b><span style="color: white;">Relevant AD<o:p></o:p></span></b></div>
</td>
<td style="background: yellow; border-left: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 398.75pt;" valign="top" width="532"><div class="MsoNormal">
<b><span style="color: #0f243e;">This ad may be
helpful, if relevant to your search.<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<script type="text/javascript">
<!--
google_ad_client = "pub-0413634368644504";
/* 728x90, created 9/19/11 */
google_ad_slot = "4620530839";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
</div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal">
<span class="Apple-style-span" style="font-size: 32px; font-weight: bold;">Evolution of Work Study</span></div>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
Companies competing in the market are always in search of creative and effective techniques to produce their product in order to sustain in the market. This leads to evolution of new and innovative techniques for the completion of work.</div>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
Evolution is said to be a gradual process over time in which something changes into a different and usually more complex or better form. With changes in time there is a need to bring a change in the present technique of work study as it can, not only lead to the implementation of new and innovative techniques which are much more efficient in completion of work, but will also earn the organization a huge profit.</div>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
Today the various organizations with all their complexities and modernization naturally demand more systematic approaches like work study and also, any further evolutions in it. Following are the points which prove the necessity of evolution of work study.</div>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
• It helps to increase the productivity.<br />
• It helps to reduce manufacturing cost of the products.<br />
• It helps to serve the customers with utmost satisfaction.<br />
• It helps in maintaining better working conditions by erasing all unnecessary factors.<br />
• It helps to understand the manufacturing processes in detail and is helpful in selecting the correct process out of many.</div>
<h1>
</h1>
<h1>
</h1>
<h1>
Basic procedure of Work Study</h1>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
There is a basic procedure(steps) in work study to carry out any fixed operation as per the required standards. These steps have been developed by carrying out various experiments and understanding the requirement of the particular job. These steps are internationally accepted and are very much helpful in selecting the correct process for the product. Following are the procedure involved in work study:</div>
<h2>
1. Selection of Job/ Process</h2>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
As work study is the study of the process for finding out the best job, so the first step in work study is the selection of the job. The job as decided by the manufacturer for manufacturing any specified product is selected and the following steps are carried out.</div>
<h2>
2. Record</h2>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
After selecting the job the next step that follows is to record the various data related to the job. These data are helpful in understanding the working efficiency of the selected job. The recorded data are time, quality of finished product, various problems faced, level of comfort of the worker during the work, etc.</div>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
These data are measured with the help of various sophisticated measuring instruments with very high level of accuracy.</div>
<h2>
3. Examination</h2>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
The various data recorded are examined, and the conclusion is made whether to continue the job or to go for any replacement.</div>
<h2>
4. Development of New Method</h2>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
As per the decisions made in the previous step the development of a new method is carried out by keeping in view the various data recorded by the previously selected method. The newly developed method promises to give better results than the previous method.</div>
<h2>
5. Measurement</h2>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
This step mainly deals with the measurement of time for completion of work by the newly developed method. This is mainly carried out to set the standard time for the completion of work.</div>
<h2>
6. Define</h2>
This step justifies the use of the newly developed method and defines the various parameters related with it.<br />
<h2>
7. Install</h2>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
The newly developed method is installed for its implementation in the industry and, hence the previous method gets replaced.</div>
<h2>
8. Maintain</h2>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
The newly developed and installed method is taken care of so that it can be used in the long run of the organization to get the benefits. The various procedure involved in work study can be understood in a better way by taking the help of the following example.</div>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
For example in a cloth industry the indigenous method of hand sewing is used. It is too much time consuming and reduces productivity. The organization decides to replace this method with more efficient technique to increase the productivity in a reduced amount of time. Work study is implemented to solve the problem.</div>
Select : Hand sewing<br />
Record : Time taken, quality, number of cloths sewed, etc.<br />
Examine : Why time taken is less? Quality reduced?<br />
Develop : Stitching machines, automated robos.<br />
Measure : The standard time for completion of job by the developed method.<br />
Define : How development can be fruitful?<br />
Install : Installation of the new machines.<br />
Maintain : New machines are taken care of.<br />
<h1>
</h1>
<h1>
</h1>
<h1>
Summary</h1>
<div data-mce-style="text-align: justify;" style="text-align: justify;">
We have tried to present here an overview of standard methods and key factrors which when followed by an industry, will help increase the efficiency of their main process by decreasing the amount of time taken by the process from start to end and by increasing the output of the process.<br />
<br />
[About the Author: Hyder is an engineering student in Mechanical engineering from College of Engineering, Pandharpur, Maharashtra India.]</div>
</div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com10Pandharpur, Maharashtra, India17.675128 75.32677217.64487 75.28729 17.705386 75.366254000000012tag:blogger.com,1999:blog-7382811498705583939.post-51365217642899647972011-09-16T16:52:00.002-04:002011-09-23T09:53:23.556-04:00Java Interview Questions - Part3<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<b>Q 1. What is the output of the following</b></div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
StringBuffer sb1 = new StringBuffer("Amit");<br />
StringBuffer sb2= new StringBuffer("Amit");<br />
String ss1 = "Amit";<br />
System.out.println(sb1==sb2);<br />
System.out.println(sb1.equals(sb2));<br />
System.out.println(sb1.equals(ss1));<br />
System.out.println("Poddar".substring(3));<br />
Ans:<br />
a) false<br />
false<br />
false<br />
dar<br />
b) false<br />
true<br />
false<br />
Poddar<br />
c) Compiler Error<br />
d) true<br />
true<br />
false<br />
dar<br />
Correct Answer is a)<br />
***** Look carefully at code and answer the following questions ( Q2 to Q8)<br />
1 import java.applet.Applet;<br />
2 import java.awt.*;<br />
3 import java.awt.event.*;<br />
4 public class hello4 extends Applet {<br />
5 public void init(){<br />
6 add(new myButton("BBB"));<br />
7 }<br />
8 public void paint(Graphics screen) {<br />
9 }<br />
10 class myButton extends Button{<br />
11 myButton(String label){<br />
12 super(label);<br />
13 }<br />
14 public String paramString(){<br />
15 return super.paramString();<br />
16 }<br />
17 }<br />
18 public static void main(String[] args){<br />
19 Frame myFrame = new Frame(<br />
20 "Copyright Amit");<br />
21 myFrame.setSize(300,100);<br />
22 Applet myApplet = new hello4();<br />
23 Button b = new Button("My Button");<br />
24 myApplet.add(b);<br />
25 b.setLabel(b.getLabel()+"New");<br />
26 // myButton b1 =(new hello4()).new myButton("PARAMBUTTON");<br />
27 System.out.println(b1.paramString());<br />
28 myFrame.add(myApplet);<br />
29 myFrame.setVisible(true);<br />
30 myFrame.addWindowListener(new WindowAdapter(){<br />
31 public void windowClosing(WindowEvent e){<br />
32 System.exit(0);}});<br />
33 }<br />
34 } //End hello4 class.<br />
<br />
<b>Q2. If you run the above program via appletviewer ( defining a HTML file), You see on screen.</b><br />
a) Two buttons<br />
b) One button with label as "BBB"<br />
c) One button with label as "My ButtonNew"<br />
d) One button with label as "My Button"<br />
Correct answer is b)<br />
<br />
<b>Q3. In the above code if line 26 is uncommented and program runs as standalone application</b><br />
a) Compile Error<br />
b) Run time error<br />
c) It will print the the label as PARAMBUTTON for button b1<br />
Correct answer is c)<br />
<br />
<b>Q4 In the code if you compile as "javac hello4.java" following files will be generated.</b><br />
a) hello4.class, myButton.class,hello41.class<br />
b)hello4.class, hello4$myButton.class,hello4$1.class<br />
c)hello4.clas,hello4$myButton.class<br />
Correct answer is b)<br />
<br />
<b>Q5. If above program is run as a standalone application. How many buttons will be displayed</b><br />
a) Two buttons<br />
b) One button with label as "BBB"<br />
c) One button with label as "My ButtonNew"<br />
d) One button with label as "My Button"<br />
correct answer is C)<br />
<br />
<b>Q6. If from line no 14 keyword "public" is removed, what will happen.( Hint :paramString() method in java.awt.Button is a protected method. (Assume line 26 is uncommented)</b><br />
a) Code will not compile.<br />
b) Code will compile but will give a run time error.<br />
c) Code will compile and no run time error.<br />
Correct answer is a). As you can not override a method with weaker access privileges<br />
<br />
<b>Q7. If from line no 14 keyword "public" is replaced with "protected", what will happen.(Hint :paramString() method in java.awt.Button is a protected method.(Assume line 26 is uncommented)</b><br />
a) Code will not compile.<br />
b) Code will compile but will give a run time error.<br />
c) Code will compile and no run time error.<br />
Correct answer is c) . As you can access a protected variable in the same package.<br />
<br />
<b>Q8.If line no 26 is replaced with Button b1 = new Button("PARAMBUTTON").(Hint :paramString() method in java.awt.Button is a protected method.(Assume line 26 is uncommented)</b><br />
a) Code will not compile.<br />
b) Code will compile but will give a run time error.<br />
c) Code will compile and no run time error.<br />
Correct answer is a) Because protected variables and methods can not be accssed in another package directly. They can only be accessed if the class is subclassed and instance of subclass is used.<br />
<br />
<b>Q9. What is the output of following if the return value is "the value 0 if the argument string is equal to this string; a value less than 0 if this string is lexicographically less than the string argument; and a value greater than 0 if this string is lexicographically greater than the string argument" (Assuming written inside main)</b><br />
String s5 = "AMIT";<br />
String s6 = "amit";<br />
System.out.println(s5.compareTo(s6));<br />
System.out.println(s6.compareTo(s5));<br />
System.out.println(s6.compareTo(s6));<br />
Ans<br />
a> -32<br />
32<br />
0<br />
b> 32<br />
32<br />
0<br />
c> 32<br />
-32<br />
0<br />
d> 0<br />
0<br />
0<br />
Correct Answer is a)<br />
<br />
<b>Q10) What is the output (Assuming written inside main)</b><br />
String s1 = new String("amit");<br />
String s2 = s1.replace('m','i');<br />
s1.concat("Poddar");<br />
System.out.println(s1);<br />
System.out.println((s1+s2).charAt(5));<br />
a) Compile error<br />
b) amitPoddar<br />
o<br />
c) amitPoddar<br />
i<br />
d) amit<br />
i<br />
Correct answer is d)As String is imutable.so s1 is always "amit". and s2 is "aiit".<br />
<br />
<b>Q11) What is the output (Assuming written inside main)</b><br />
String s1 = new String("amit");<br />
System.out.println(s1.replace('m','r'));<br />
System.out.println(s1);<br />
String s3="arit";<br />
String s4="arit";<br />
String s2 = s1.replace('m','r');<br />
System.out.println(s2==s3);<br />
System.out.println(s3==s4);<br />
a) arit<br />
amit<br />
false<br />
true<br />
b) arit<br />
arit<br />
false<br />
true<br />
c) amit<br />
amit<br />
false<br />
true<br />
d) arit<br />
amit<br />
true<br />
true<br />
Correct answer is a) s3==s4 is true because java points both s3 and s4 to same memory location in string pool<br />
<br />
<b>Q12) Which one does not extend java.lang.Number</b><br />
1)Integer<br />
2)Boolean<br />
3)Character<br />
4)Long<br />
5)Short<br />
Correct answer is 2) and 3)<br />
<br />
Q13) Which one does not have a valueOf(String) method<br />
1)Integer<br />
2)Boolean<br />
3)Character<br />
4)Long<br />
5)Short<br />
Correct answer is 3)<br />
<br />
Q.14) What is the output of following (Assuming written inside main)<br />
String s1 = "Amit";<br />
String s2 = "Amit";<br />
String s3 = new String("abcd");<br />
String s4 = new String("abcd");<br />
System.out.println(s1.equals(s2));<br />
System.out.println((s1==s2));<br />
System.out.println(s3.equals(s4));<br />
System.out.println((s3==s4));<br />
a) true<br />
true<br />
true<br />
false<br />
b) true<br />
true<br />
true<br />
true<br />
c) true<br />
false<br />
true<br />
false<br />
Correct answer is a)<br />
<br />
<b>Q15. Which checkbox will be selected in the following code ( Assume with main and added to a Frame)</b><br />
Frame myFrame = new Frame("Test");<br />
CheckboxGroup cbg = new CheckboxGroup();<br />
Checkbox cb1 = new Checkbox("First",true,cbg);<br />
Checkbox cb2 = new Checkbox("Scond",true,cbg);<br />
Checkbox cb3 = new Checkbox("THird",false,cbg);<br />
cbg.setSelectedCheckbox(cb3);<br />
myFrame.add(cb1);<br />
myFrame.add(cb2);<br />
myFrame.add(cb3);<br />
a) cb1<br />
b) cb2,cb1<br />
c) cb1,cb2,cb3<br />
d) cb3<br />
Correct Answer is d) As in a CheckboxGroup only one can be selected<br />
<br />
<b>Q16) Which checkbox will be selected in the following code ( Assume with main and added to a Frame)</b><br />
Frame myFrame = new Frame("Test");<br />
CheckboxGroup cbg = new CheckboxGroup();<br />
Checkbox cb1 = new Checkbox("First",true,cbg);<br />
Checkbox cb2 = new Checkbox("Scond",true,cbg);<br />
Checkbox cb3 = new Checkbox("THird",true,cbg);<br />
myFrame.add(cb1);<br />
myFrame.add(cb2);<br />
myFrame.add(cb3);<br />
a) cb1<br />
b) cb2,cb1<br />
c) cb1,cb2,cb3<br />
d) cb3<br />
Correct Answer is d) As in a CheckboxGroup only one can be selected<br />
<br />
<b>Q17) What will be the output of line 5</b><br />
1 Choice c1 = new Choice();<br />
2 c1.add("First");<br />
3 c1.addItem("Second");<br />
4 c1.add("Third");<br />
5 System.out.println(c1.getItemCount());<br />
a) 1<br />
b) 2<br />
c) 3<br />
d) None of the above<br />
Correct Answer is c)<br />
Q18) What will be the order of four items added<br />
Choice c1 = new Choice();<br />
c1.add("First");<br />
c1.addItem("Second");<br />
c1.add("Third");<br />
c1.insert("Lastadded",2);<br />
System.out.println(c1.getItemCount());<br />
a) First,Second,Third,Fourth<br />
b) First,Second,Lastadded,Third<br />
c) Lastadded,First,Second,Third<br />
Correct ANswer is b)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<b>Q19) Answer based on following code</b><br />
1 Choice c1 = new Choice();<br />
2 c1.add("First");<br />
3 c1.addItem("Second");<br />
4 c1.add("Third");<br />
5 c1.insert("Lastadded",1000);<br />
6 System.out.println(c1.getItemCount());<br />
a) Compile time error<br />
b) Run time error at line 5<br />
c) No error and line 6 will print 1000<br />
d) No error and line 6 will print 4<br />
Correct ANswer is d)<br />
<br />
<b>Q20) Which one of the following does not extends java.awt.Component</b><br />
a) CheckBox<br />
b) Canvas<br />
c) CheckbocGroup<br />
d) Label<br />
Correct answer is c)<br />
<br />
<b>Q21) What is default layout manager for panels and applets?</b><br />
a) Flowlayout<br />
b) Gridlayout<br />
c) BorderLayout<br />
Correct answer is a)<br />
<br />
<b>Q22) For awt components which of the following statements are true?</b><br />
a) If a component is not explicitly assigned a font, it usese the same font that it container uses.<br />
b) If a component is not explicitly assigned a foreground color , it usese the same foreground color that it container uses.<br />
c) If a component is not explicitly assigned a backround color , it usese the same background color that it container uses.<br />
d) If a component is not explicitly assigned a layout manager , it usese the same layout manager that it container uses.<br />
correct answer is a),b),c)<br />
<br />
<b>Q23)java.awt.Component class method getLocation() returns Point (containg x and y cordinate).What does this x and y specify</b><br />
a) Specify the postion of components lower-left component in the coordinate space of the component's parent.<br />
b) Specify the postion of components upper-left component in the coordinate space of the component's parent.<br />
c) Specify the postion of components upper-left component in the coordinate space of the screen.<br />
correct answer is b)<br />
<br />
<b>Q24. What will be the output of follwing</b><br />
{<br />
double d1 = -0.5d;<br />
System.out.println("Ceil for d1 " + Math.ceil(d1));<br />
System.out.println("Floor for d1 " +Math.floor(d1));<br />
}<br />
Answers:<br />
a) Ceil for d1 0<br />
Floor for d1 -1;<br />
b) Ceil for d1 0<br />
Floor for d1 -1.0;<br />
c) Ceil for d1 0.0<br />
Floor for d1 -1.0;<br />
d) Ceil for d1 -0.0<br />
Floor for d1 -1.0;<br />
correct answer is d) as 0.0 is treated differently from -0.0<br />
<br />
<b>Q25. What is the output of following</b><br />
{<br />
float f4 = -5.5f;<br />
float f5 = 5.5f;<br />
float f6 = -5.49f;<br />
float f7 = 5.49f;<br />
System.out.println("Round f4 is " + Math.round(f4));<br />
System.out.println("Round f5 is " + Math.round(f5));<br />
System.out.println("Round f6 is " + Math.round(f6));<br />
System.out.println("Round f7 is " + Math.round(f7));<br />
}<br />
a)Round f4 is -6<br />
Round f5 is 6<br />
Round f6 is -5<br />
Round f7 is 5<br />
b)Round f4 is -5<br />
Round f5 is 6<br />
Round f6 is -5<br />
Round f7 is 5<br />
Correct answer is b)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<b>Q26. Given Integer.MIN_VALUE = -2147483648</b><br />
<b>Integer.MAX_VALUE = 2147483647</b><br />
<b>What is the output of following</b><br />
{<br />
float f4 = Integer.MIN_VALUE;<br />
float f5 = Integer.MAX_VALUE;<br />
float f7 = -2147483655f;<br />
System.out.println("Round f4 is " + Math.round(f4));<br />
System.out.println("Round f5 is " + Math.round(f5));<br />
System.out.println("Round f7 is " + Math.round(f7));<br />
}<br />
a)Round f4 is -2147483648<br />
Round f5 is 2147483647<br />
Round f7 is -2147483648<br />
b)Round f4 is -2147483648<br />
Round f5 is 2147483647<br />
Round f7 is -2147483655<br />
correct answer is a)<br />
//Reason If the argument is negative infinity or any value less than or equal to the value of Integer.MIN_VALUE, the result is<br />
equal to the value of Integer.MIN_VALUE.<br />
If the argument is positive infinity or any value greater than or equal to the value of Integer.MAX_VALUE, the result is<br />
equal to the value of Integer.MAX_VALUE. // From JDK api documentation<br />
<br />
Q27)<br />
1 Boolean b1 = new Boolean("TRUE");<br />
2 Boolean b2 = new Boolean("true");<br />
3 Boolean b3 = new Boolean("JUNK");<br />
4 System.out.println("" + b1 + b2 + b3);<br />
a) Comiler error<br />
b) RunTime error<br />
c)truetruefalse<br />
d)truetruetrue<br />
Correct answer is c)<br />
<br />
<b>Q28) In the above question if line 4 is changed to</b><br />
<b>System.out.println(b1+b2+b3); The output is</b><br />
a) Compile time error<br />
b) Run time error<br />
c) truetruefalse<br />
d) truetruetrue<br />
Correct answer is a) As there is no method to support Boolean + Boolean<br />
Boolean b1 = new Boolean("TRUE");<br />
Think ----->System.out.println(b1); // Is this valid or not?<br />
<br />
<b>Q29. What is the output</b><br />
{<br />
Float f1 = new Float("4.4e99f");<br />
Float f2 = new Float("-4.4e99f");<br />
Double d1 = new Double("4.4e99");<br />
System.out.println(f1);<br />
System.out.println(f2);<br />
System.out.println(d1);<br />
}<br />
a) Runtime error<br />
b) Infinity<br />
-Infinity<br />
4.4E99<br />
c) Infinity<br />
-Infinity<br />
Infinity<br />
d) 4.4E99<br />
-4.4E99<br />
4.4E99<br />
Correct answer is b)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<b>Q30 Q. Which of the following wrapper classes can not</b><br />
<b>take a "String" in constructor</b><br />
1) Boolean<br />
2) Integer<br />
3) Long<br />
4) Character<br />
5) Byte<br />
6) Short<br />
correct answer is 4)<br />
<br />
<b>Q31. What is the output of following</b><br />
Double d2 = new Double("-5.5");<br />
Double d3 = new Double("-5.5");<br />
System.out.println(d2==d3);<br />
System.out.println(d2.equals(d3));<br />
a) true<br />
true<br />
b) false<br />
false<br />
c) true<br />
false<br />
d) false<br />
true<br />
Correct answer is d)<br />
<br />
<b>Q32) Which one of the following always honors the components's preferred size.</b><br />
a) FlowLayout<br />
b) GridLayout<br />
c) BorderLayout<br />
Correct answer is a)<br />
Q33) Look at the following code<br />
import java.awt.*;<br />
public class visual extends java.applet.Applet{<br />
static Button b = new Button("TEST");<br />
public void init(){<br />
add(b);<br />
}<br />
public static void main(String args[]){<br />
Frame f = new Frame("Visual");<br />
f.setSize(300,300);<br />
f.add(b);<br />
f.setVisible(true);<br />
}<br />
}<br />
What will happen if above code is run as a standalone application<br />
a) Displays an empty frame<br />
b) Displays a frame with a button covering the entire frame<br />
c) Displays a frame with a button large enough to accomodate its label.<br />
Correct answer is b) Reason- Frame uses Border Layout which places the button to CENTRE<br />
(By default) and ignores Button's preferred size.<br />
Q34 If the code in Q33 is compiled and run via appletviewer what will happen<br />
a) Displays an empty applet<br />
b) Displays a applet with a button covering the entire frame<br />
c) Displays a applet with a button large enough to accomodate its label.<br />
Correct answer is c) Reason- Applet uses FlowLayout which honors Button's preferred size.<br />
<br />
<b>Q35. What is the output</b><br />
public static void main(String args[]){<br />
Frame f = new Frame("Visual");<br />
f.setSize(300,300);<br />
f.setVisible(true);<br />
Point p = f.getLocation();<br />
System.out.println("x is " + p.x);<br />
System.out.println("y is " + p.y);<br />
}<br />
a) x is 300<br />
y is 300<br />
b) x is 0<br />
y is 0<br />
c) x is 0<br />
y is 300<br />
correct answer is b) Because postion is always relative to parent container and in this<br />
case Frame f is the topemost container<br />
<br />
<b>Q36) Which one of the following always ignores the components's preferred size.</b><br />
a) FlowLayout<br />
b) GridLayout<br />
c) BorderLayout<br />
Correct answer is b)<br />
Q37) Consider a directory structure like this (NT or 95)<br />
C:\JAVA\12345.msg --FILE<br />
\dir1\IO.class -- IO.class is under dir1<br />
Consider the following code<br />
import java.io.*;<br />
public class IO {<br />
public static void main(String args[]) {<br />
File f = new File("..\\12345.msg");<br />
try{<br />
System.out.println(f.getCanonicalPath());<br />
System.out.println(f.getAbsolutePath());<br />
}catch(IOException e){<br />
System.out.println(e);<br />
}<br />
}<br />
}<br />
What will be the output of running "java IO" from C:\java\dir1<br />
a) C:\java\12345.msg<br />
C:\java\dir1\..\12345.msg<br />
b) C:\java\dir1\12345.msg<br />
C:\java\dir1\..\12345.msg<br />
c) C:\java\dir1\..\12345.msg<br />
C:\java\dir1\..\12345.msg<br />
correct answer is a) as getCanonicalPath Returns the canonical form of this File object's pathname. The precise definition of canonical form is system-dependent, but it usually<br />
specifies an absolute pathname in which all relative references and references to the current user directory have been completely resolved.<br />
WHERE AS<br />
getAbsolutePath Returns the absolute pathname of the file represented by this object. If this object represents an absolute pathname, then return the pathname. Otherwise, return a pathname that is a concatenation of the current user directory, the separator character, and the pathname of this file object.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<b>Q38) Suppose we copy IO.class from C:\java\dir1 to c:\java</b><br />
What will be the output of running "java IO" from C:\java.<br />
a) C:\java\12345.msg<br />
C:\java\..\12345.msg<br />
b) C:\12345.msg<br />
C:\java\..\12345.msg<br />
c) C:\java\..\12345.msg<br />
C:\java\\..\12345.msg<br />
correct answer is b)<br />
<br />
<b>Q39) Which one of the following methods of java.io.File throws IOException and why</b><br />
a) getCanonicalPath and getAbsolutePath both require filesystem queries.<br />
b) Only getCannonicalPath as it require filesystem queries.<br />
c) Only getAbsolutePath as it require filesystem queries.<br />
Correct answer is b)<br />
Q40) What will be the output if<br />
Consider a directory structure like this (NT or 95)<br />
C:\JAVA\12345.msg --FILE<br />
\dir1\IO.class -- IO.class is under dir1<br />
import java.io.*;<br />
public class IO {<br />
public static void main(String args[]) {<br />
File f = new File("12345.msg");<br />
String arr[] = f.list();<br />
System.out.println(arr.length);<br />
}<br />
}<br />
a) Compiler error as 12345.msg is a file not a directory<br />
b) java.lang.NullPointerException at run time<br />
c) No error , but nothing will be printed on screen<br />
Correct ansewer is b)<br />
Q41) What will be the output<br />
Consider a directory structure like this (NT or 95)<br />
C:\JAVA\12345.msg --FILE<br />
import java.io.*;<br />
public class IO {<br />
public static void main(String args[]) {<br />
File f1 = new File("\\12345.msg");<br />
System.out.println(f1.getPath());<br />
System.out.println(f1.getParent());<br />
System.out.println(f1.isAbsolute());<br />
System.out.println(f1.getName());<br />
System.out.println(f1.exists());<br />
System.out.println(f1.isFile());<br />
}<br />
}<br />
a) \12345.msg<br />
\<br />
true<br />
12345.msg<br />
true<br />
true<br />
b) \12345.msg<br />
\<br />
true<br />
\12345.msg<br />
false<br />
false<br />
c) 12345.msg<br />
\<br />
true<br />
12345.msg<br />
false<br />
false<br />
d) \12345.msg<br />
\<br />
true<br />
12345.msg<br />
false<br />
false<br />
correct answer is d)<br />
Q42) If in question no 41 the line<br />
File f1 = new File("\\12345.msg"); is replaced with File f1 = new File("12345.msg");<br />
What will be the output<br />
a) 12345.msg<br />
\<br />
true<br />
12345.msg<br />
true<br />
true<br />
b) 12345.msg<br />
null<br />
true<br />
12345.msg<br />
true<br />
true</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
c) 12345.msg<br />
null<br />
false<br />
12345.msg<br />
true<br />
true<br />
d) \12345.msg<br />
\<br />
true<br />
12345.msg<br />
false<br />
false</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Correct answer is c)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Java Certification Model Question & Answer - 3<br />
________________________________________<br />
1. Which declarations are true about inner classes?<br />
A. new InnerClass(){<br />
B. public abstract class Innerclass{<br />
C. new Ineerclass() extends Mainclass{<br />
2. Which access modifier is used to restrict the methods scope to itself and still allows other classes to subclass that class?<br />
A. private<br />
B. final<br />
C. protected<br />
D. friend<br />
3. Which one of the following will equate to true?<br />
Float f1 = new Float(0.9f);<br />
Float f2 = new Float(0.9f);<br />
Double d = new Double(0.9);<br />
A. f1 == f2;<br />
B. f2 == d;<br />
C. f1.equals(f2);<br />
D. f2.equals(f1)<br />
E. f2.equals(d); // will return false not error<br />
4. Which statement below is true regarding the above code?<br />
The following shows class hierarchy<br />
Derived1 , Derived2 extends from Mainclass.<br />
Mainclass m;<br />
Derived1 one;<br />
Derived2 two;<br />
one = (Derived1) m;<br />
A. Compilation error<br />
B. Comiplation is legal but generates runtime error<br />
C. Compilation is legal but generates ClassCastException during execution<br />
D. Compilation is legal probably okay during execution<br />
5. What will be printed when the follwoing code is executed?<br />
outer : for(int i =1; i<3 ; i++){<br />
inner : for ( int j = 1;j 0){<br />
System.out.println("i is "+i);<br />
}<br />
System.out.println("Finished");<br />
}<br />
What will be the output of the above code?<br />
A. i is 0<br />
B. Infinite loop<br />
C. Finished<br />
D. i is 1<br />
23. getID() method of AWTEvent refers to what?<br />
Nature or Type of Event<br />
24. What are the correct declarations for 2 dimensional ararys?<br />
A. int a[][] = new int[4,4];<br />
B. int []a[] = new int[4][4];<br />
C. int a[][] = new int[4][4];<br />
D. int a[4][4] = new int[][];<br />
E. int [][]a = new int[4][4];<br />
25. What causes current thread to stop executing?( which statements are true about thread?)<br />
A. Threads created from same class finish together<br />
B. Thread can be created only by subclassing java.lang.Thread<br />
C. Thread execution of specific thread can be suspended indefinitely if required.<br />
D. Java interpreter exits when main thread exits even if the other threads are running.<br />
E. Uncoordination of multiple threads will affect data integrity .<br />
26. What statements are true about gc?<br />
A. gc releases memory at predictable rates.<br />
B. gc requires additional code in case multiple threads are running<br />
C. Programmer has a mechanism that explicitly & immediately frees memory used by java objects<br />
D. gc system never reclaims memory from objects which are still accessible to a running user thread<br />
27. What are true about Listeners?<br />
A. Return value is boolean<br />
B. Most components allow multiple listeners to be added<br />
C. A copy of original event passed to listener method<br />
D. Multiple listeners added to single component, they must be made friends<br />
E. The order of invocation of the listener is specified to be in which they are added<br />
28. What is the correct way of declaring native methods?<br />
A. public abstract native method() {}<br />
B. public native void method();<br />
C. native void method(){}<br />
D. public native void method() {}<br />
29. What are the java keywords?<br />
A. friendly<br />
B. extends<br />
C. synchronized<br />
D. sizeof<br />
E. interfaceof<br />
30. What is the range for char variable?<br />
0 to 216-1<br />
31. What is the range for int variable?<br />
-231 to 231-1<br />
32. Which are valid java identifiers?<br />
A. thisfinal<br />
B. %great<br />
C. intern<br />
D. 3fun<br />
A. z_fal<br />
33. The main method for class Test is given below:<br />
try{<br />
state();<br />
}<br />
catch(ArithmeticException ex)<br />
{<br />
System.out.println("Arithmetic");<br />
}<br />
finally{<br />
Sytem.out.println("finally");<br />
}<br />
System.out.println("done");<br />
What will be the output of the above code (Choose the correct one) if method state() throws NullPointerException?<br />
A. Arithmetic<br />
B. finally<br />
C. done<br />
D. Exception not caught<br />
34. At what point will the String referenced at line 1 is available for garbage collection in this method?<br />
1. String s1 = "abc";<br />
2. String s2 = "bdc";<br />
3. s1.concat(s2);<br />
4. s1 = null;<br />
5. s1 += s2;<br />
6. System.out.println(s1);<br />
A. Just Before 4<br />
B. Just Before 5<br />
C. Just Before 6<br />
D. never<br />
35. Which cannot be added to Container?<br />
A. Applet<br />
B. Panel<br />
C. Container<br />
D. MenuComponent<br />
36. Which of the following code statement will throw NullPointerException<br />
String s = "hello";<br />
s == null;<br />
a. if(s != null & s.length() >0)<br />
b. if(s == null && s.length() >0)<br />
c. if(s != null || s.length() >0)<br />
d. if(s == null | s.length() >0)<br />
37. which of the following are true?<br />
class x {<br />
int x;<br />
public static void main(String args[]) {<br />
x = 10;<br />
System.out.println(" value of x "+x);<br />
}<br />
}<br />
a. prints "value of x 10"<br />
b. compilation error<br />
c. Runtime Error<br />
38. what are the valid codes that come in //Point X place declared in Test.java<br />
// Point X<br />
public class Test {}<br />
a. import java.awt.*;<br />
b. package local.util;<br />
c. class someclass {}<br />
d. protected class myclass {}<br />
e. private static final int more = 1000;<br />
39. Which of the following evaluate to true?<br />
float f = 10.0f<br />
long l = 10L<br />
a. f == 10.0f<br />
b. f = 10.0 // 10.0 is a double value<br />
c. f == 10.0 // converted to parent class, here double<br />
d. f == l<br />
e. l == 10.0<br />
40. FilterInputStream is subclassed by DataInputStream, BufferedInputStream, ByteArrayInputStream.<br />
What is the valid argument for FilterInputStream constructor?<br />
a. File<br />
b. FileInputStream<br />
c. PrintStream<br />
d. BufferedReader</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1. Which of the following are valid definitions of an application's main( ) method?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) public static void main();<br />
b) public static void main( String args );<br />
c) public static void main( String args[] );<br />
d) public static void main( Graphics g );<br />
e) public static boolean main( String args[] );</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
2. If MyProg.java were compiled as an application and then run from the command line as:<br />
java MyProg I like tests<br />
what would be the value of args[ 1 ] inside the main( ) method?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) MyProg<br />
b) "I"<br />
c) "like"<br />
d) 3<br />
e) 4<br />
f) null until a value is assigned</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
3. Which of the following are Java keywords?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) array<br />
b) boolean<br />
c) Integer<br />
d) protect<br />
e) super</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
4. After the declaration:<br />
char[] c = new char[100];<br />
what is the value of c[50]?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) 50<br />
b) 49<br />
c) '\u0000'<br />
d) '\u0020'<br />
e) " "<br />
f) cannot be determined<br />
g) always null until a value is assigned</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
5. After the declaration:<br />
int x;<br />
the range of x is:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) -231 to 231-1<br />
b) -216 to 216 - 1<br />
c) -232 to 232<br />
d) -216 to 216<br />
e) cannot be determined; it depends on the machine</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
6. Which identifiers are valid?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) _xpoints<br />
b) r2d2<br />
c) bBb$<br />
d) set-flow<br />
e) thisisCrazy</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
7. Represent the number 6 as a hexadecimal literal.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
8. Which of the following statements assigns "Hello Java" to the String variable s?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) String s = "Hello Java";<br />
b) String s[] = "Hello Java";<br />
c) new String s = "Hello Java";<br />
d) String s = new String("Hello Java");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
9. An integer, x has a binary value (using 1 byte) of 10011100. What is the binary value of z after these statements:<br />
int y = 1 <> performs signed shift while >>> performs an unsigned shift.<br />
b) >>> performs a signed shift while >> performs an unsigned shift.<br />
c) << performs a signed shift while <<< performs an insigned shift.<br />
d) <<< performs a signed shift while << performs an unsigned shift.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
11. The statement ...<br />
String s = "Hello" + "Java";<br />
yields the same value for s as ...<br />
String s = "Hello";<br />
String s2= "Java";<br />
s.concat( s2 );<br />
True<br />
False</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
12. If you compile and execute an application with the following code in its main() method:<br />
String s = new String( "Computer" );</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
if( s == "Computer" )</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println( "Equal A" );</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
if( s.equals( "Computer" ) )</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println( "Equal B" );<br />
a) It will not compile because the String class does not support the = = operator.<br />
b) It will compile and run, but nothing is printed.<br />
c) "Equal A" is the only thing that is printed.<br />
d) "Equal B" is the only thing that is printed.<br />
e) Both "Equal A" and "Equal B" are printed.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
13. Consider the two statements:<br />
1. boolean passingScore = false && grade == 70;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
2. boolean passingScore = false & grade == 70;<br />
The expression<br />
grade == 70<br />
is evaluated:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) in both 1 and 2<br />
b) in neither 1 nor 2<br />
c) in 1 but not 2<br />
d) in 2 but not 1<br />
e) invalid because false should be FALSE</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
14. Given the variable declarations below:<br />
byte myByte;<br />
int myInt;<br />
long myLong;<br />
char myChar;<br />
float myFloat;<br />
double myDouble;<br />
Which one of the following assignments would need an explicit cast?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) myInt = myByte;<br />
b) myInt = myLong;<br />
c) myByte = 3;<br />
d) myInt = myChar;<br />
e) myFloat = myDouble;<br />
f) myFloat = 3;<br />
g) myDouble = 3.0;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
15. Consider this class example:<br />
class MyPoint</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
{ void myMethod()</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
{ int x, y;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
x = 5; y = 3;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.print( " ( " + x + ", " + y + " ) " );</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
switchCoords( x, y );</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.print( " ( " + x + ", " + y + " ) " );</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
void switchCoords( int x, int y )</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
{ int temp;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
temp = x;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
x = y;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
y = temp;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.print( " ( " + x + ", " + y + " ) " );</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
What is printed to standard output if myMethod() is executed?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) (5, 3) (5, 3) (5, 3)<br />
b) (5, 3) (3, 5) (3, 5)<br />
c) (5, 3) (3, 5) (5, 3)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
16. To declare an array of 31 floating point numbers representing snowfall for each day of March in Gnome, Alaska, which declarations would be valid?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
a) double snow[] = new double[31];<br />
b) double snow[31] = new array[31];<br />
c) double snow[31] = new array;<br />
d) double[] snow = new double[31];</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
17. If arr[] contains only positive integer values, what does this function do?<br />
public int guessWhat( int arr[] )</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
{ int x= 0;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
for( int i = 0; i < arr.length; i++ )</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
x = x < arr[i] ? arr[i] : x;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
return x;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
a) Returns the index of the highest element in the array<br />
b) Returns true/false if there are any elements that repeat in the array<br />
c) Returns how many even numbers are in the</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) What is the Vector class?<br />
ANSWER : The Vector class provides the capability to implement a growable array of objects.<br />
2) What is the Set interface?<br />
ANSWER : The Set interface provides methods for accessing the elements of a finite mathematical set.Sets do not allow duplicate elements.<br />
3) What is Dictionary class?<br />
ANSWER : The Dictionary class is the abstarct super class of Hashtable and Properties class.Dictionary provides the abstarct functions used to store and retrieve objects by key-value.This class allows any object to be used as a key or value.<br />
4) What is the Hashtable class?<br />
ANSWER : The Hashtable class implements a hash table data structure. A hash table indexes and stores objects in a dictionary using hash codes as the objects' keys. Hash codes are integer values that identify objects.<br />
5) What is the Properties class?<br />
Answer : The properties class is a subclass of Hashtable that can be read from or written to a stream.It also provides the capability to specify a set of default values to be used if a specified key is not found in the table. We have two methods load() and save().<br />
6) What changes are needed to make the following prg to compile?<br />
import java.util.*;<br />
class Ques{<br />
public static void main (String args[]) {<br />
String s1 = "abc";<br />
String s2 = "def";<br />
Vector v = new Vector();<br />
v.add(s1);<br />
v.add(s2);<br />
String s3 = v.elementAt(0) + v.elementAt(1);<br />
System.out.println(s3);<br />
}<br />
}<br />
ANSWER : Declare Ques as public B) Cast v.elementAt(0) to a String<br />
C) Cast v.elementAt(1) to an Object. D) Import java.lang<br />
ANSWER : B) Cast v.elementAt(0) to a String</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
8) What is the output of the prg.<br />
import java.util.*;<br />
class Ques{<br />
public static void main (String args[]) {<br />
String s1 = "abc";<br />
String s2 = "def";<br />
Stack stack = new Stack();<br />
stack.push(s1);<br />
stack.push(s2);<br />
try{<br />
String s3 = (String) stack.pop() + (String) stack.pop() ;<br />
System.out.println(s3);<br />
}catch (EmptyStackException ex){}<br />
}<br />
}<br />
ANSWER : abcdef B) defabc C) abcabc D) defdef<br />
ANSWER : B) defabc<br />
9) Which of the following may have duplicate elements?<br />
ANSWER : Collection B) List C) Map D) Set<br />
ANSWER : A and B Neither a Map nor a Set may have duplicate elements.<br />
10) Can null value be added to a List?<br />
ANSWER : Yes.A Null value may be added to any List.<br />
11) What is the output of the following prg.<br />
import java.util.*;<br />
class Ques{<br />
public static void main (String args[]) {<br />
HashSet set = new HashSet();<br />
String s1 = "abc";<br />
String s2 = "def";<br />
String s3 = "";<br />
set.add(s1);<br />
set.add(s2);<br />
set.add(s1);<br />
set.add(s2);<br />
Iterator i = set.iterator();<br />
while(i.hasNext())<br />
{<br />
s3 += (String) i.next();<br />
}<br />
System.out.println(s3);<br />
}<br />
}<br />
A) abcdefabcdef B) defabcdefabc C) fedcbafedcba D) defabc<br />
ANSWER : D) defabc. Sets may not have duplicate elements.<br />
12) Which of the following java.util classes support internationalization?<br />
A) Locale B) ResourceBundle C) Country D) Language<br />
ANSWER : A and B . Country and Language are not java.util classes.<br />
13) What is the ResourceBundle?<br />
A. The ResourceBundle class also supports internationalization.<br />
ResourceBundle subclasses are used to store locale-specific resources that can be loaded by a program to tailor the program's appearence to the paticular locale in which it is being run. Resource Bundles provide the capability to isolate a program's locale-specific resources in a standard and modular manner.<br />
14) How are Observer Interface and Observable class, in java.util package, used?<br />
ANSWER : Objects that subclass the Observable class maintain a list of Observers. When an Observable object is updated it invokes the update() method of each of its observers to notify the observers that it has changed state. The Observer interface is implemented by objects that observe Observable objects.<br />
15) Which java.util classes and interfaces support event handling?<br />
ANSWER : The EventObject class and the EventListener interface support event processing.<br />
16) Does java provide standard iterator functions for inspecting a collection of objects?<br />
ANSWER : The Enumeration interface in the java.util package provides a framework for stepping once through a collection of objects. We have two methods in that interface.<br />
public interface Enumeration {<br />
boolean hasMoreElements();<br />
Object nextElement();<br />
}<br />
17) The Math.random method is too limited for my needs- How can I generate random numbers more flexibly?<br />
ANSWER : The random method in Math class provide quick, convienient access to random numbers, but more power and flexibility use the Random class in the java.util package.<br />
double doubleval = Math.random();<br />
The Random class provide methods returning float, int, double, and long values.<br />
nextFloat() // type float; 0.0 <= value < 1.0<br />
nextDouble() // type double; 0.0 <= value < 1.0<br />
nextInt() // type int; Integer.MIN_VALUE <= value <= Integer.MAX_VALUE<br />
nextLong() // type long; Long.MIN_VALUE <= value Generic Servlet-->HttpServlet-->MyServlet.<br />
The Servlet interface declares, but does not implement, methods that manage the servlet and its communications with clients. Servlet writers provide some or all of these methods when developing a servlet.<br />
6) When a servlet accepts a call from a client, it receives two objects- What are they?<br />
ANSWER : ServeltRequest: Which encapsulates the communication from the client to the server.<br />
ServletResponse: Whcih encapsulates the communication from the servlet back to the client.<br />
ServletRequest and ServletResponse are interfaces defined by the javax.servlet package.<br />
7) What information that the ServletRequest interface allows the servlet access to?<br />
ANSWER : Information such as the names of the parameters passed in by the client, the protocol (scheme) being used by the client, and the names of the remote host that made the request and the server that received it.<br />
The input stream, ServletInputStream.Servlets use the input stream to get data from clients that use application protocols such as the HTTP POST and PUT methods.<br />
8) What information that the ServletResponse interface gives the servlet methods for replying to the client?<br />
ANSWER : It Allows the servlet to set the content length and MIME type of the reply.<br />
Provides an output stream, ServletOutputStream and a Writer through which the servlet can send the reply data.<br />
9) What is the servlet Lifecycle?<br />
ANSWER : Each servlet has the same life cycle:<br />
A server loads and initializes the servlet (init())<br />
The servlet handles zero or more client requests (service())<br />
The server removes the servlet (destroy())<br />
(some servers do this step only when they shut down)<br />
10) How HTTP Servlet handles client requests?<br />
ANSWER : An HTTP Servlet handles client requests through its service method. The service method supports standard HTTP client requests by dispatching each request to a method designed to handle that request. 1<br />
Definitions</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1. Encapsulation :<br />
Encapsulation is the mechanism that binds together code and the data it manipulates and keeps both safe from outside interference and misuse.<br />
2. Inheritance:<br />
Inheritance is the process by which one object acquires the properties of another object.<br />
3. Polymorphism:<br />
Polymorphism is a feature that allows one interface to be used for a general class of actions. The specific action is determined by the exact nature of actions.<br />
4. Code Blocks:<br />
Two or more statements which is allowed to be grouped into blocks of code is otherwise called as Code Blocks.This is done by enclosing the statements between opening and closing curly braces.<br />
5. Floating-point numbers:<br />
Floating-point numbers which is also known as real numbers, are used when evaluating expressions that require fractional precision.<br />
6. Unicode:<br />
Unicode defines a fully international character set that can represent all of the characters found in all human languages. It is a unification of dozens of character sets, such as Latin, Greek, Arabic and many more.<br />
7. Booleans:<br />
Java has a simple type called boolean, for logical values. It can have only on of two possible values, true or false.<br />
8. Casting:<br />
A cast is simply an explicit type conversion. To create a conversion between two incompatible types, you must use a cast.<br />
9. Arrays:<br />
An array is a group of like-typed variables that are referred to by a common name. Arrays offer a convenient means of grouping related information. Arrays of any type can be created and may have one or more dimension.<br />
10. Relational Operators:<br />
The relational operators determine the relationship that one operand has to the other. They determine the equality and ordering.<br />
11.Short-Circuit Logical Operators:<br />
The secondary versions of the Boolean AND and OR operators are known as short-<br />
circuit logical operators. It is represented by || and &&..<br />
12. Switch:<br />
The switch statement is Java’s multiway branch statement. It provides an easy way to<br />
dispatch execution to different parts of your code based on the value of an<br />
experession.<br />
13. Jump Statements:<br />
Jump statements are the statements which transfer control to another part of your<br />
program. Java Supports three jump statements: break, continue, and return.<br />
14. Instance Variables:<br />
The data, or variable, defined within a class are called instance variable.<br />
Which of the following class defines a legal abstract class ?<br />
a. class Animal { abstract void grow1( ); }<br />
b. adstract Animal { abstract void grow1( ); }<br />
c. class abstract Animal { abstract void grow1( ); }<br />
d. abstract class Animal { abstract void grow1( ); }<br />
e. abstract class Animal { abstract void grow1( );<br />
{ System.out.println(grow1); } }<br />
For an object to be a target foe a thread, that object must be of type ________<br />
What is the proper way of defining a class named key so that it cannot be subclassed ?<br />
a. class Key { }<br />
b. abstract final class Key { }<br />
c. native class Key { }<br />
d. class Key { final: }<br />
e. final class key { }<br />
What modes are legal for creating a new RandomAccessFile object ?<br />
a. w<br />
b. r<br />
c. x<br />
d. rw<br />
e. xrw<br />
In RMI, Using which class to create ServerSide Object.<br />
a. ServerSocket<br />
b. Server<br />
c. UnicastRemoteObject<br />
d. MulicastSocket<br />
In RMI application, using whaic object to interact with Server object from the Client Object.<br />
a. Remote<br />
b. RMIServer<br />
c. Skeleton<br />
d. Stub<br />
In RMI which class is using to bind the Server</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Questions on Language Fundamentals<br />
1. Which of these are legal identifiers. Select all the correct answers.<br />
A. number_1<br />
B. number_a<br />
C. $1234<br />
D. -volatile<br />
2. Which of these are not legal identifiers. Select all the correct answers.<br />
A. 1alpha<br />
B. _abcd<br />
C. xy+abc<br />
D. transient<br />
E. account-num<br />
F. very_long_name<br />
3. Which of the following are keywords in Java. Select all the correct answers.<br />
A. friend<br />
B. NULL<br />
C. implement<br />
D. synchronized<br />
E. throws<br />
4. Which of the following are Java keywords. Select all the correct answers.<br />
A. super<br />
B. strictfp<br />
C. void<br />
D. synchronize<br />
E. instanceof<br />
5. Which of these are Java keywords. Select all the correct answers<br />
A. TRUE<br />
B. volatile<br />
C. transient<br />
D. native<br />
E. interface<br />
F. then<br />
G. new<br />
6. Using up to four characters, write the Java representation of octal literal 6.<br />
7. Using up to four characters, write the Java representation of integer literal 3 in hexadecimal.<br />
8. Using up to four characters, write the Java representation of integer literal 10 in hexadecimal.<br />
9. What is the minimum value of char type. Select the one correct answer.<br />
A. 0<br />
B. -215<br />
C. -28<br />
D. -215 - 1<br />
E. -216<br />
F. -216 - 1<br />
10. How many bytes are used to represent the primitive data type int in Java. Select the one correct answer.<br />
A. 2<br />
B. 4<br />
C. 8<br />
D. 1<br />
E. The number of bytes to represent an int is compiler dependent.<br />
11. What is the legal range of values for a variable declared as a byte. Select the one correct answer.<br />
A. 0 to 256<br />
B. 0 to 255<br />
C. -128 to 127<br />
D. -128 to 128<br />
E. -127 to 128<br />
F. -215 to 215 - 1<br />
12. The width in bits of double primitive type in Java is --. Select the one correct answer.<br />
A. The width of double is platform dependent<br />
B. 64<br />
C. 128<br />
D. 8<br />
E. 4<br />
13. What would happen when the following is compiled and executed. Select the one correct answer.<br />
14.<br />
15. public class Compare {<br />
16. public static void main(String args[]) {<br />
17. int x = 10, y;<br />
18. if(x = 10) y = 2;<br />
21. System.out.println("y is " + y);<br />
22. }<br />
23. }<br />
24.<br />
A. The program compiles and prints y is 0 when executed.<br />
B. The program compiles and prints y is 1 when executed.<br />
C. The program compiles and prints y is 2 when executed.<br />
D. The program does not compile complaining about y not being initialized.<br />
E. The program throws a runtime exception.<br />
25. What would happen when the following is compiled and executed. Select the one correct answer.<br />
26.<br />
27. class example {<br />
28. int x;<br />
29. int y;<br />
30. String name;<br />
31. public static void main(String args[]) {<br />
32. example pnt = new example();<br />
33. System.out.println("pnt is " + pnt.name +<br />
34. " " + pnt.x + " " + pnt.y);<br />
35. }<br />
36. }<br />
37.<br />
A. The program does not compile because x, y and name are not initialized.<br />
B. The program throws a runtime exception as x, y, and name are used before initialization.<br />
C. The program prints pnt is 0 0.<br />
D. The program prints pnt is null 0 0.<br />
E. The program prints pnt is NULL false false<br />
38. The initial value of an instance variable of type String which is not explicitly initialized in the program is --. Select the one correct answer.<br />
A. null<br />
B. ""<br />
C. NULL<br />
D. 0<br />
E. The instance variable must be explicitly assigned.<br />
39. The initial value of a local variable of type String which is not explicitly initialized and which is defined in a member function of a class. Select all the correct answer.<br />
A. null<br />
B. ""<br />
C. NULL<br />
D. 0<br />
E. The local variable must be explicitly assigned.<br />
40. Which of the following are legal Java programs. Select all the correct answer.<br />
A. // The comments come before the package<br />
package pkg;<br />
import java.awt.*;<br />
class C{};<br />
B. package pkg;<br />
import java.awt.*;<br />
class C{};<br />
C. package pkg1;<br />
package pkg2;<br />
import java.awt.*;<br />
class C{};<br />
D. package pkg;<br />
import java.awt.*;<br />
E. import java.awt.*;<br />
class C{};<br />
F. import java.awt.*;<br />
package pkg;<br />
class C {};<br />
41. Which of the following statements are correct. Select all correct answers.<br />
A. A Java program must have a package statement.<br />
B. A package statement if present must be the first statement of the program<br />
C. If a Java program defines both a package and import statement, then the import statement must come before the package statement.<br />
D. An empty file is a valid source file.<br />
E. A Java file without any class or interface definitions can also be compiled.<br />
F. If an import statement is present, it must appear before any class or interface definitions.<br />
42. What would be the results of compiling and running the following class. Select the one correct answer.<br />
43.<br />
44. class test {<br />
45. public static void main() {<br />
46. System.out.println("test");<br />
47. }<br />
48. }<br />
49.<br />
A. The program does not compile as there is no main method defined.<br />
B. The program compiles and runs generating an output of "test"<br />
C. The program compiles and runs but does not generate any output.<br />
D. The program compiles but does not run.<br />
50. Which of these are valid declarations for the main method? Select all correct answers.<br />
A. public void main();<br />
B. static void main(String args[]);<br />
C. public static void main(String args[]);<br />
D. static public void main(String);<br />
E. public static void main(String );<br />
F. public static int main(String args[]);<br />
51. Which of the following are valid declarations for the main method. Select all correct answers.<br />
A. public static void main(String args[]);<br />
B. public static void main(String []args);<br />
C. final static public void main (String args[]);<br />
D. public static int main(String args[]);<br />
E. public static abstract void main(String args[]);<br />
52. What happens when the following program is compiled and executed with the arguments - java test. Select the one correct answer.<br />
53.<br />
54. class test {<br />
55. public static void main(String args[]) {<br />
56. if(args.length > 0)<br />
57. System.out.println(args.length);<br />
58. }<br />
59. }<br />
60.<br />
A. The program compiles and runs but does not print anything.<br />
B. The program compiles and runs and prints 0<br />
C. The program compiles and runs and prints 1<br />
D. The program compiles and runs and prints 2<br />
E. The program does not compile.<br />
61. What is the result of compiling and running this program ? Select the one correct answer.<br />
62.<br />
63. public class test {<br />
64. public static void main(String args[]) {<br />
65. int i, j;<br />
66. int k = 0;<br />
67. j = 2;<br />
68. k = j = i = 1;<br />
69. System.out.println(k);<br />
70. }<br />
71. }<br />
72.<br />
73.<br />
A. The program does not compile as k is being read without being initialized.<br />
B. The program does not compile because of the statement k = j = i = 1;<br />
C. The program compiles and runs printing 0.<br />
D. The program compiles and runs printing 1.<br />
E. The program compiles and runs printing 2.<br />
74. What gets printed on the standard output when the class below is compiled and executed by entering "java test lets see what happens". Select the one correct answer.<br />
75.<br />
76. public class test {<br />
77. public static void main(String args[]) {<br />
78. System.out.println(args[0] + " " + args[args.length - 1]);<br />
79. }<br />
80. }<br />
81.<br />
A. The program will throw an ArrayIndexOutOfBounds exception.<br />
B. The program will print "java test"<br />
C. The program will print "java hapens";<br />
D. The program will print "test happens"<br />
E. The program will print "lets happens"<br />
82. What gets printed on the standard output when the class below is compiled and executed by entering "java test lets see what happens". Select the one correct answer.<br />
83.<br />
84. public class test {<br />
85. public static void main(String args[]) {<br />
86. System.out.println(args[0] + " " + args[args.length]);<br />
87. }<br />
88. }<br />
89.<br />
A. The program will throw an ArrayIndexOutOfBounds exception.<br />
B. The program will print "java test"<br />
C. The program will print "java hapens";<br />
D. The program will print "test happens"<br />
E. The program will print "lets happens"<br />
90. What all gets printed on the standard output when the class below is compiled and executed by entering "java test lets see what happens". Select all correct answers.<br />
91.<br />
92. public class test {<br />
93. public static void main(String args[]) {<br />
94. System.out.println(args[0] + " " + args.length);<br />
95. }<br />
96. }<br />
97.<br />
A. java<br />
B. test<br />
C. lets<br />
D. 3<br />
E. 4<br />
F. 5<br />
G. 6<br />
98. What happens when the following program is compiled and run. Select the one correct answer.<br />
99.<br />
100. public class example {<br />
101. int i = 0;<br />
102. public static void main(String args[]) {<br />
103. int i = 1;<br />
104. i = change_i(i);<br />
105. System.out.println(i);<br />
106. }<br />
107. public static int change_i(int i) {<br />
108. i = 2;<br />
109. i *= 2;<br />
110. return i;<br />
111. }<br />
112. }<br />
113.<br />
A. The program does not compile.<br />
B. The program prints 0.<br />
C. The program prints 1.<br />
D. The program prints 2.<br />
E. The program prints 4.<br />
114. What happens when the following program is compiled and run. Select the one correct answer.<br />
115.<br />
116. public class example {<br />
117. int i = 0;<br />
118. public static void main(String args[]) {<br />
119. int i = 1;<br />
120. change_i(i);<br />
121. System.out.println(i);<br />
122. }<br />
123. public static void change_i(int i) {<br />
124. i = 2;<br />
125. i *= 2;<br />
126. }<br />
127. }<br />
128.<br />
A. The program does not compile.<br />
B. The program prints 0.<br />
C. The program prints 1.<br />
D. The program prints 2.<br />
E. The program prints 4.<br />
129. What happens when the following program is compiled and run. Select the one correct answer.<br />
130.<br />
131. public class example {<br />
132. int i[] = {0};<br />
133. public static void main(String args[]) {<br />
134. int i[] = {1};<br />
135. change_i(i);<br />
136. System.out.println(i[0]);<br />
137. }<br />
138. public static void change_i(int i[]) {<br />
139. i[0] = 2;<br />
140. i[0] *= 2;<br />
141. }<br />
142. }<br />
143.<br />
A. The program does not compile.<br />
B. The program prints 0.<br />
C. The program prints 1.<br />
D. The program prints 2.<br />
E. The program prints 4.<br />
144. What happens when the following program is compiled and run. Select the one correct answer.<br />
145.<br />
146. public class example {<br />
147. int i[] = {0};<br />
148. public static void main(String args[]) {<br />
149. int i[] = {1};<br />
150. change_i(i);<br />
151. System.out.println(i[0]);<br />
152. }<br />
153. public static void change_i(int i[]) {<br />
154. int j[] = {2};<br />
155. i = j;<br />
156. }<br />
157. }<br />
158.<br />
A. The program does not compile.<br />
B. The program prints 0.<br />
C. The program prints 1.<br />
D. The program prints 2.<br />
E. The program prints 4.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answers to questions on Language Fundamentals<br />
6. a, b, c<br />
7. a, c, d, e<br />
8. d, e<br />
9. a, b, c, e<br />
10. b, c, d, e, g<br />
11. Any of the following are correct answers - 06, 006, or 0006<br />
12. Any of the following are correct answers - 0x03, 0X03, 0X3 or 0x3<br />
13. Any of the following are correct answers - 0x0a, 0X0a, 0Xa, 0xa, 0x0A, 0X0A, 0XA, 0xA<br />
14. a<br />
15. b<br />
16. c<br />
17. b<br />
18. d. The variable y is getting read before being properly initialized.<br />
19. d. Instance variable of type int and String are initialized to 0 and NULL respectively.<br />
20. a<br />
21. e<br />
22. a, b, d, e<br />
23. b, d, e, f<br />
24. d<br />
25. b, c<br />
26. a, b, c<br />
27. a<br />
28. d<br />
29. e<br />
30. a<br />
31. c, e<br />
32. e<br />
33. c<br />
34. e<br />
35. c</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Questions on Operator and Assignments<br />
1. In the following class definition, which is the first line (if any) that causes a compilation error. Select the one correct answer.<br />
2.<br />
3. pubic class test {<br />
4. public static void main(String args[]) {<br />
5. char c;<br />
6. int i;<br />
7. c = 'A'; // 1<br />
8. i = c; //2<br />
9. c = i + 1; //3<br />
10. c++; //4<br />
11. }<br />
12. }<br />
13.<br />
A. The line labeled 1.<br />
B. The line labeled 2.<br />
C. The line labeled 3.<br />
D. The line labeled 4.<br />
E. All the lines are correct and the program compiles.<br />
14. Which of these assignments are valid. Select all correct answers.<br />
A. short s = 28;<br />
B. float f = 2.3;<br />
C. double d = 2.3;<br />
D. int I = '1';<br />
E. byte b = 12;<br />
15. What gets printed when the following program is compiled and run. Select the one correct answer.<br />
16.<br />
17. class test {<br />
18. public static void main(String args[]) {<br />
19. int i,j,k,l=0;<br />
20. k = l++;<br />
21. j = ++k;<br />
22. i = j++;<br />
23. System.out.println(i);<br />
24. }<br />
25. }<br />
26.<br />
A. 0<br />
B. 1<br />
C. 2<br />
D. 3<br />
27. Which of these lines will compile? Select all correct answers.<br />
A. short s = 20;<br />
B. byte b = 128;<br />
C. char c = 32;<br />
D. double d = 1.4;;<br />
E. float f = 1.4;<br />
F. byte e = 0;<br />
28. The signed right shift operator in Java is --. Select the one correct answer.<br />
A. <><br />
C. >>>;<br />
D. None of these.<br />
29. What gets printed on the standard output when the class below is compiled and executed. Select the one correct answer.<br />
30.<br />
31. public static ShortCkt {<br />
32. public static void main(String args[]) {<br />
33. int i = 0;<br />
34. boolean t = true;<br />
35. boolean f = false, b;<br />
36. b = (t && ((i++) == 0));<br />
37. b = (f && ((i+=2) > 0));<br />
38. System.out.println(i);<br />
39. }<br />
40. }<br />
41.<br />
A. 0<br />
B. 1<br />
C. 2<br />
D. 3<br />
42. What gets printed on the standard output when the class below is compiled and executed. Select the one correct answer.<br />
43.<br />
44. public static ShortCkt {<br />
45. public static void main(String args[]) {<br />
46. int i = 0;<br />
47. boolean t = true;<br />
48. boolean f = false, b;<br />
49. b = (t & ((i++) == 0));<br />
50. b = (f & ((i+=2) > 0));<br />
51. System.out.println(i);<br />
52. }<br />
53. }<br />
54.<br />
A. 0<br />
B. 1<br />
C. 2<br />
D. 3<br />
55. What gets printed on the standard output when the class below is compiled and executed. Select the one correct answer.<br />
56.<br />
57. public static ShortCkt {<br />
58. public static void main(String args[]) {<br />
59. int i = 0;<br />
60. boolean t = true;<br />
61. boolean f = false, b;<br />
62. b = (t || ((i++) == 0));<br />
63. b = (f || ((i+=2) > 0));<br />
64. System.out.println(i);<br />
65. }<br />
66. }<br />
67.<br />
A. 0<br />
B. 1<br />
C. 2<br />
D. 3<br />
68. What gets printed on the standard output when the class below is compiled and executed. Select the one correct answer.<br />
69.<br />
70. public static ShortCkt {<br />
71. public static void main(String args[]) {<br />
72. int i = 0;<br />
73. boolean t = true;<br />
74. boolean f = false, b;<br />
75. b = (t | ((i++) == 0));<br />
76. b = (f | ((i+=2) > 0));<br />
77. System.out.println(i);<br />
78. }<br />
79. }<br />
80.<br />
A. 0<br />
B. 1<br />
C. 2<br />
D. 3<br />
81. Which operator is used to perform bitiwse inversion in Java. Select the one correct answer.<br />
A. ~<br />
B. !<br />
C. &<br />
D. |<br />
E. ^<br />
82. What gets printed when the following program is compiled and run. Select the one correct answer.<br />
83.<br />
84.<br />
85. public class test {<br />
86. public static void main(String args[]) {<br />
87. byte x = 3;<br />
88. x = (byte)~x;<br />
89. System.out.println(x);<br />
90. }<br />
91. }<br />
92.<br />
93.<br />
A. 3<br />
B. 0<br />
C. 1<br />
D. 11<br />
E. 252<br />
F. 214<br />
G. 124<br />
H. -4<br />
94. What gets displayed on the screen when the following program is compiled and run. Select the one correct answer.<br />
95.<br />
96. public class test {<br />
97. public static void main(String args[]) {<br />
98. int x,y;<br />
99. x = 3 & 5;<br />
100. y = 3 | 5;<br />
101. System.out.println(x + " " + y);<br />
102. }<br />
103. }<br />
104.<br />
A. 7 1<br />
B. 3 7<br />
C. 1 7<br />
D. 3 1<br />
E. 1 3<br />
F. 7 3<br />
G. 7 5<br />
105. What gets displayed on the screen when the following program is compiled and run. Select the one correct answer.<br />
106.<br />
107. public class test {<br />
108. public static void main(String args[]) {<br />
109. int x,y;<br />
110. x = 1 & 7;<br />
111. y = 3 ^ 6;<br />
112. System.out.println(x + " " + y);<br />
113. }<br />
114. }<br />
115.<br />
A. 1 3<br />
B. 3 5<br />
C. 5 1<br />
D. 3 6<br />
E. 1 7<br />
F. 1 5<br />
116. Which operator is used to perform bitwise exclusive or.<br />
A. &<br />
B. ^<br />
C. |<br />
D. !<br />
E. ~<br />
117. What gets displayed on the screen when the following program is compiled and run. Select the one correct answer.<br />
118.<br />
119. public class test {<br />
120. public static void main(String args[]) {<br />
121. boolean x = true;<br />
122. int a;<br />
123. if(x) a = x ? 1: 2;<br />
124. else a = x ? 3: 4;<br />
125. System.out.println(a);<br />
126. }<br />
127. }<br />
128.<br />
A. 1<br />
B. 2<br />
C. 3<br />
D. 4<br />
129. What gets displayed on the screen when the following program is compiled and run. Select the one correct answer.<br />
130.<br />
131. public class test {<br />
132. public static void main(String args[]) {<br />
133. boolean x = false;<br />
134. int a;<br />
135. if(x) a = x ? 1: 2;<br />
136. else a = x ? 3: 4;<br />
137. System.out.println(a);<br />
138. }<br />
139. }<br />
140.<br />
A. 1<br />
B. 2<br />
C. 3<br />
D. 4<br />
141. What gets displayed on the screen when the following program is compiled and run. Select the one correct answer.<br />
142.<br />
143. public class test {<br />
144. public static void main(String args[]) {<br />
145. int x, y;<br />
146.<br />
147. x = 5 >> 2;<br />
148. y = x >>> 2;<br />
149. System.out.println(y);<br />
150. }<br />
151. }<br />
152.<br />
A. 5<br />
B. 2<br />
C. 80<br />
D. 0<br />
E. 64<br />
153. What gets displayed on the screen when the following program is compiled and run. Select the one correct answer.<br />
154.<br />
155. public class test {<br />
156. public static void main(String args[]) {<br />
157. int x;<br />
158.<br />
159. x = -3 >> 1;<br />
160. x = x >>> 2;<br />
161. x = x << 1;<br />
162. System.out.println(x);<br />
163. }<br />
164. }<br />
165.<br />
A. 1<br />
B. 0<br />
C. 7<br />
D. 5<br />
E. 23<br />
F. 2147483646<br />
166. Which of the following are correct. Select all correct answers.<br />
A. Java provides two operators to do left shift - << and <> is the zero fill right shift operator.<br />
C. >>> is the signed right shift operator.<br />
D. For positive numbers, results of p[erators >> and >>> are same.<br />
167. What is the result of compiling and running the following program. Select one correct answer.<br />
168.<br />
169. public class test {<br />
170. public static void main(String args[]) {<br />
171. int i = -1;<br />
172. i = i >> 1;<br />
173. System.out.println(i);<br />
174. }<br />
175. }<br />
176.<br />
A. 63<br />
B. -1<br />
C. 0<br />
D. 1<br />
E. 127<br />
F. 128<br />
G. 255<br />
177. What all gets printed when the following gets compiled and run. Select all correct answers.<br />
178.<br />
179. public class example {<br />
180. public static void main(String args[]) {<br />
181. int x = 0;<br />
182. if(x > 0) x = 1;<br />
183.<br />
184. switch(x) {<br />
185. case 1: System.out.println(1);<br />
186. case 0: System.out.println(0);<br />
187. case 2: System.out.println(2);<br />
188. break;<br />
189. case 3: System.out.println(3);<br />
190. default: System.out.println(4);<br />
191. break;<br />
192. }<br />
193. }<br />
194. }<br />
195.<br />
A. 0<br />
B. 1<br />
C. 2<br />
D. 3<br />
E. 4<br />
196. What happens when the following class is compiled and run. Select one correct answer.<br />
197.<br />
198. public class test {<br />
199. public static void main(String args[]) {<br />
200. int x = 0, y = 1, z;<br />
201. if(x)<br />
202. z = 0;<br />
203. else<br />
204. z = 1;<br />
205.<br />
206. if(y)<br />
207. z = 2;<br />
208. else<br />
209. z = 3;<br />
210. System.out.println(z);<br />
211. }<br />
212. }<br />
213.<br />
A. The program prints 0<br />
B. The program prints 1<br />
C. The program prints 2<br />
D. The program prints 3<br />
E. The program does not compile because of problems in the if statement.<br />
214. Which all lines are part of the output when the following code is compiled and run. Select all correct answers.<br />
215.<br />
216. public class test {<br />
217. public static void main(String args[]) {<br />
218. for(int i = 0; i = 0; j--) {<br />
220. if(i == j) continue;<br />
221. System.out.println(i + " " + j);<br />
222. }<br />
223. }<br />
224. }<br />
225. }<br />
226.<br />
A. 0 0<br />
B. 0 1<br />
C. 0 2<br />
D. 0 3<br />
E. 1 0<br />
F. 1 1<br />
G. 1 2<br />
H. 1 3<br />
I. 2 0<br />
J. 2 1<br />
K. 2 2<br />
L. 2 3<br />
M. 3 0<br />
N. 3 1<br />
O. 3 2<br />
P. 3 3<br />
Q. The program does not print anything.<br />
227. Which all lines are part of the output when the following code is compiled and run. Select all correct answers.<br />
228.<br />
229. public class test {<br />
230. public static void main(String args[]) {<br />
231. for(int i = 0; i < 3; i++)<br />
232. for(int j = 3; j <= 0; j--) {<br />
233. if(i == j) continue;<br />
234. System.out.println(i + " " + j);<br />
235. }<br />
236. }<br />
237. }<br />
238. }<br />
239.<br />
A. 0 0<br />
B. 0 1<br />
C. 0 2<br />
D. 0 3<br />
E. 1 0<br />
F. 1 1<br />
G. 1 2<br />
H. 1 3<br />
I. 2 0<br />
J. 2 1<br />
K. 2 2<br />
L. 2 3<br />
M. 3 0<br />
N. 3 1<br />
O. 3 2<br />
P. 3 3<br />
Q. The program does not print anything.<br />
240. Which all lines are part of the output when the following code is compiled and run. Select all correct answers.<br />
241.<br />
242. public class test {<br />
243. public static void main(String args[]) {<br />
244. for(int i = 0; i = 0; j--) {<br />
246. if(i == j) break;<br />
247. System.out.println(i + " " + j);<br />
248. }<br />
249. }<br />
250. }<br />
251. }<br />
252.<br />
A. 0 0<br />
B. 0 1<br />
C. 0 2<br />
D. 0 3<br />
E. 1 0<br />
F. 1 1<br />
G. 1 2<br />
H. 1 3<br />
I. 2 0<br />
J. 2 1<br />
K. 2 2<br />
L. 2 3<br />
M. 3 0<br />
N. 3 1<br />
O. 3 2<br />
P. 3 3<br />
253. Which all lines are part of the output when the following code is compiled and run. Select all correct answers.<br />
254.<br />
255. public class test {<br />
256. public static void main(String args[]) {<br />
257. outer: for(int i = 0; i = 0; j--) {<br />
259. if(i == j) continue outer;<br />
260. System.out.println(i + " " + j);<br />
261. }<br />
262. }<br />
263. }<br />
264. }<br />
265.<br />
A. 0 0<br />
B. 0 1<br />
C. 0 2<br />
D. 0 3<br />
E. 1 0<br />
F. 1 1<br />
G. 1 2<br />
H. 1 3<br />
I. 2 0<br />
J. 2 1<br />
K. 2 2<br />
L. 2 3<br />
M. 3 0<br />
N. 3 1<br />
O. 3 2<br />
P. 3 3<br />
266. Which all lines are part of the output when the following code is compiled and run. Select all correct answers.<br />
267.<br />
268. public class test {<br />
269. public static void main(String args[]) {<br />
270. outer : for(int i = 0; i = 0; j--) {<br />
272. if(i == j) break outer;<br />
273. System.out.println(i + " " + j);<br />
274. }<br />
275. }<br />
276. }<br />
277. }<br />
278.<br />
A. 0 0<br />
B. 0 1<br />
C. 0 2<br />
D. 0 3<br />
E. 1 0<br />
F. 1 1<br />
G. 1 2<br />
H. 1 3<br />
I. 2 0<br />
J. 2 1<br />
K. 2 2<br />
L. 2 3<br />
M. 3 0<br />
N. 3 1<br />
O. 3 2<br />
P. 3 3</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answers to questions on Operators and Asignments<br />
17. c. It is not possible to assign an integer to a character in this case without a cast.<br />
18. a, c, d, e. 2.3 is of type double. So it cannot be assigned to a float without a cast.<br />
19. b<br />
20. a, c, d, f. If RHS (Right hand side) is an integer within the correct range of LHS (Left hand side), and if LHS is char, byte, or short, no cast is required. A decimal number is a double by default. Assigning it to float requires a cast.<br />
21. b<br />
22. b. In the second assignment to variable b, the expression (i+=2) does not get evaluated.<br />
23. d<br />
24. c<br />
25. d<br />
26. a<br />
27. h<br />
28. c<br />
29. f<br />
30. b<br />
31. a<br />
32. d<br />
33. d<br />
34. f<br />
35. d<br />
36. b<br />
37. a, c<br />
38. e. The expression in the if statement must evaluate to a boolean.<br />
39. b, c, d, e, g, h, i, j, l<br />
40. q<br />
41. b, c, d, g, h, l<br />
42. b, c, d, g, h, l<br />
43. b, c, d</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Questions on Class Fundamentals<br />
1. What gets displayed on the screen when the following program is compiled and run. Select the one correct answer.<br />
2.<br />
3. protected class example {<br />
4. public static void main(String args[]) {<br />
5. String test = "abc";<br />
6. test = test + test;<br />
7. System.out.println(test);<br />
8. }<br />
9. }<br />
10.<br />
A. The class does not compile because the top level class cannot be protected.<br />
B. The program prints "abc"<br />
C. The program prints "abcabc"<br />
D. The program does not compile because statement "test = test + test" is illegal.<br />
11. A top level class may have only the following access modifier. Select one correct answer.<br />
A. package<br />
B. friendly<br />
C. private<br />
D. protected<br />
E. public<br />
12. Write down the modifier of a method which makes the method available to all classes in the same package and to all the subclases of this class.<br />
13. Select the one most appropriate answer. A top level class without any modifier is accessible to -<br />
A. any class<br />
B. any class within the same package<br />
C. any class within the same file<br />
D. any subclass of this class.<br />
14. Is this True or False. In Java an abstract class cannot be subclassed.<br />
15. Is this True or False. In Java a final class must be subclassed before it can be used.<br />
16. Which of the following are true. Select all correct answers.<br />
A. A static method may be invoked before even a single instance of the class is constructed.<br />
B. A static method cannot access non-static methods of the class.<br />
C. Abstract modifier can appear before a class or a method but not before a variable.<br />
D. final modifier can appear before a class or a variable but not before a method.<br />
E. Synchronized modifier may appear before a method or a variable but not before a class.<br />
________________________________________<br />
Answers to questions on classes in Java<br />
1. a<br />
2. e<br />
3. protected<br />
4. b<br />
5. False<br />
6. False<br />
7. a, b, c. final modifier may appear before a method or a variable but not before a class.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Questions on Language Fundamentals<br />
1. Which of these are legal identifiers. Select all the correct answers.<br />
A. number_1<br />
B. number_a<br />
C. $1234<br />
D. -volatile<br />
2. Which of these are not legal identifiers. Select all the correct answers.<br />
A. 1alpha<br />
B. _abcd<br />
C. xy+abc<br />
D. transient<br />
E. account-num<br />
F. very_long_name<br />
3. Which of the following are keywords in Java. Select all the correct answers.<br />
A. friend<br />
B. NULL<br />
C. implement<br />
D. synchronized<br />
E. throws<br />
4. Which of the following are Java keywords. Select all the correct answers.<br />
A. super<br />
B. strictfp<br />
C. void<br />
D. synchronize<br />
E. instanceof<br />
5. Which of these are Java keywords. Select all the correct answers<br />
A. TRUE<br />
B. volatile<br />
C. transient<br />
D. native<br />
E. interface<br />
F. then<br />
G. new<br />
6. Using up to four characters, write the Java representation of octal literal 6.<br />
7. Using up to four characters, write the Java representation of integer literal 3 in hexadecimal.<br />
8. Using up to four characters, write the Java representation of integer literal 10 in hexadecimal.<br />
9. What is the minimum value of char type. Select the one correct answer.<br />
A. 0<br />
B. -215<br />
C. -28<br />
D. -215 - 1<br />
E. -216<br />
F. -216 - 1<br />
10. How many bytes are used to represent the primitive data type int in Java. Select the one correct answer.<br />
A. 2<br />
B. 4<br />
C. 8<br />
D. 1<br />
E. The number of bytes to represent an int is compiler dependent.<br />
11. What is the legal range of values for a variable declared as a byte. Select the one correct answer.<br />
A. 0 to 256<br />
B. 0 to 255<br />
C. -128 to 127<br />
D. -128 to 128<br />
E. -127 to 128<br />
F. -215 to 215 - 1<br />
12. The width in bits of double primitive type in Java is --. Select the one correct answer.<br />
A. The width of double is platform dependent<br />
B. 64<br />
C. 128<br />
D. 8<br />
E. 4<br />
13. What would happen when the following is compiled and executed. Select the one correct answer.<br />
14.<br />
15. public class Compare {<br />
16. public static void main(String args[]) {<br />
17. int x = 10, y;<br />
18. if(x = 10) y = 2;<br />
21. System.out.println("y is " + y);<br />
22. }<br />
23. }<br />
24.<br />
A. The program compiles and prints y is 0 when executed.<br />
B. The program compiles and prints y is 1 when executed.<br />
C. The program compiles and prints y is 2 when executed.<br />
D. The program does not compile complaining about y not being initialized.<br />
E. The program throws a runtime exception.<br />
25. What would happen when the following is compiled and executed. Select the one correct answer.<br />
26.<br />
27. class example {<br />
28. int x;<br />
29. int y;<br />
30. String name;<br />
31. public static void main(String args[]) {<br />
32. example pnt = new example();<br />
33. System.out.println("pnt is " + pnt.name +<br />
34. " " + pnt.x + " " + pnt.y);<br />
35. }<br />
36. }<br />
37.<br />
A. The program does not compile because x, y and name are not initialized.<br />
B. The program throws a runtime exception as x, y, and name are used before initialization.<br />
C. The program prints pnt is 0 0.<br />
D. The program prints pnt is null 0 0.<br />
E. The program prints pnt is NULL false false<br />
38. The initial value of an instance variable of type String which is not explicitly initialized in the program is --. Select the one correct answer.<br />
A. null<br />
B. ""<br />
C. NULL<br />
D. 0<br />
E. The instance variable must be explicitly assigned.<br />
39. The initial value of a local variable of type String which is not explicitly initialized and which is defined in a member function of a class. Select all the correct answer.<br />
A. null<br />
B. ""<br />
C. NULL<br />
D. 0<br />
E. The local variable must be explicitly assigned.<br />
40. Which of the following are legal Java programs. Select all the correct answer.<br />
A. // The comments come before the package<br />
package pkg;<br />
import java.awt.*;<br />
class C{};<br />
B. package pkg;<br />
import java.awt.*;<br />
class C{};<br />
C. package pkg1;<br />
package pkg2;<br />
import java.awt.*;<br />
class C{};<br />
D. package pkg;<br />
import java.awt.*;<br />
E. import java.awt.*;<br />
class C{};<br />
F. import java.awt.*;<br />
package pkg;<br />
class C {};<br />
41. Which of the following statements are correct. Select all correct answers.<br />
A. A Java program must have a package statement.<br />
B. A package statement if present must be the first statement of the program<br />
C. If a Java program defines both a package and import statement, then the import statement must come before the package statement.<br />
D. An empty file is a valid source file.<br />
E. A Java file without any class or interface definitions can also be compiled.<br />
F. If an import statement is present, it must appear before any class or interface definitions.<br />
42. What would be the results of compiling and running the following class. Select the one correct answer.<br />
43.<br />
44. class test {<br />
45. public static void main() {<br />
46. System.out.println("test");<br />
47. }<br />
48. }<br />
49.<br />
A. The program does not compile as there is no main method defined.<br />
B. The program compiles and runs generating an output of "test"<br />
C. The program compiles and runs but does not generate any output.<br />
D. The program compiles but does not run.<br />
50. Which of these are valid declarations for the main method? Select all correct answers.<br />
A. public void main();<br />
B. static void main(String args[]);<br />
C. public static void main(String args[]);<br />
D. static public void main(String);<br />
E. public static void main(String );<br />
F. public static int main(String args[]);<br />
51. Which of the following are valid declarations for the main method. Select all correct answers.<br />
A. public static void main(String args[]);<br />
B. public static void main(String []args);<br />
C. final static public void main (String args[]);<br />
D. public static int main(String args[]);<br />
E. public static abstract void main(String args[]);<br />
52. What happens when the following program is compiled and executed with the arguments - java test. Select the one correct answer.<br />
53.<br />
54. class test {<br />
55. public static void main(String args[]) {<br />
56. if(args.length > 0)<br />
57. System.out.println(args.length);<br />
58. }<br />
59. }<br />
60.<br />
A. The program compiles and runs but does not print anything.<br />
B. The program compiles and runs and prints 0<br />
C. The program compiles and runs and prints 1<br />
D. The program compiles and runs and prints 2<br />
E. The program does not compile.<br />
61. What is the result of compiling and running this program ? Select the one correct answer.<br />
62.<br />
63. public class test {<br />
64. public static void main(String args[]) {<br />
65. int i, j;<br />
66. int k = 0;<br />
67. j = 2;<br />
68. k = j = i = 1;<br />
69. System.out.println(k);<br />
70. }<br />
71. }<br />
72.<br />
73.<br />
A. The program does not compile as k is being read without being initialized.<br />
B. The program does not compile because of the statement k = j = i = 1;<br />
C. The program compiles and runs printing 0.<br />
D. The program compiles and runs printing 1.<br />
E. The program compiles and runs printing 2.<br />
74. What gets printed on the standard output when the class below is compiled and executed by entering "java test lets see what happens". Select the one correct answer.<br />
75.<br />
76. public class test {<br />
77. public static void main(String args[]) {<br />
78. System.out.println(args[0] + " " + args[args.length - 1]);<br />
79. }<br />
80. }<br />
81.<br />
A. The program will throw an ArrayIndexOutOfBounds exception.<br />
B. The program will print "java test"<br />
C. The program will print "java hapens";<br />
D. The program will print "test happens"<br />
E. The program will print "lets happens"<br />
82. What gets printed on the standard output when the class below is compiled and executed by entering "java test lets see what happens". Select the one correct answer.<br />
83.<br />
84. public class test {<br />
85. public static void main(String args[]) {<br />
86. System.out.println(args[0] + " " + args[args.length]);<br />
87. }<br />
88. }<br />
89.<br />
A. The program will throw an ArrayIndexOutOfBounds exception.<br />
B. The program will print "java test"<br />
C. The program will print "java hapens";<br />
D. The program will print "test happens"<br />
E. The program will print "lets happens"<br />
90. What all gets printed on the standard output when the class below is compiled and executed by entering "java test lets see what happens". Select all correct answers.<br />
91.<br />
92. public class test {<br />
93. public static void main(String args[]) {<br />
94. System.out.println(args[0] + " " + args.length);<br />
95. }<br />
96. }<br />
97.<br />
A. java<br />
B. test<br />
C. lets<br />
D. 3<br />
E. 4<br />
F. 5<br />
G. 6<br />
98. What happens when the following program is compiled and run. Select the one correct answer.<br />
99.<br />
100. public class example {<br />
101. int i = 0;<br />
102. public static void main(String args[]) {<br />
103. int i = 1;<br />
104. i = change_i(i);<br />
105. System.out.println(i);<br />
106. }<br />
107. public static int change_i(int i) {<br />
108. i = 2;<br />
109. i *= 2;<br />
110. return i;<br />
111. }<br />
112. }<br />
113.<br />
A. The program does not compile.<br />
B. The program prints 0.<br />
C. The program prints 1.<br />
D. The program prints 2.<br />
E. The program prints 4.<br />
114. What happens when the following program is compiled and run. Select the one correct answer.<br />
115.<br />
116. public class example {<br />
117. int i = 0;<br />
118. public static void main(String args[]) {<br />
119. int i = 1;<br />
120. change_i(i);<br />
121. System.out.println(i);<br />
122. }<br />
123. public static void change_i(int i) {<br />
124. i = 2;<br />
125. i *= 2;<br />
126. }<br />
127. }<br />
128.<br />
A. The program does not compile.<br />
B. The program prints 0.<br />
C. The program prints 1.<br />
D. The program prints 2.<br />
E. The program prints 4.<br />
129. What happens when the following program is compiled and run. Select the one correct answer.<br />
130.<br />
131. public class example {<br />
132. int i[] = {0};<br />
133. public static void main(String args[]) {<br />
134. int i[] = {1};<br />
135. change_i(i);<br />
136. System.out.println(i[0]);<br />
137. }<br />
138. public static void change_i(int i[]) {<br />
139. i[0] = 2;<br />
140. i[0] *= 2;<br />
141. }<br />
142. }<br />
143.<br />
A. The program does not compile.<br />
B. The program prints 0.<br />
C. The program prints 1.<br />
D. The program prints 2.<br />
E. The program prints 4.<br />
144. What happens when the following program is compiled and run. Select the one correct answer.<br />
145.<br />
146. public class example {<br />
147. int i[] = {0};<br />
148. public static void main(String args[]) {<br />
149. int i[] = {1};<br />
150. change_i(i);<br />
151. System.out.println(i[0]);<br />
152. }<br />
153. public static void change_i(int i[]) {<br />
154. int j[] = {2};<br />
155. i = j;<br />
156. }<br />
157. }<br />
158.<br />
A. The program does not compile.<br />
B. The program prints 0.<br />
C. The program prints 1.<br />
D. The program prints 2.<br />
E. The program prints 4.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answers to questions on Language Fundamentals<br />
6. a, b, c<br />
7. a, c, d, e<br />
8. d, e<br />
9. a, b, c, e<br />
10. b, c, d, e, g<br />
11. Any of the following are correct answers - 06, 006, or 0006<br />
12. Any of the following are correct answers - 0x03, 0X03, 0X3 or 0x3<br />
13. Any of the following are correct answers - 0x0a, 0X0a, 0Xa, 0xa, 0x0A, 0X0A, 0XA, 0xA<br />
14. a<br />
15. b<br />
16. c<br />
17. b<br />
18. d. The variable y is getting read before being properly initialized.<br />
19. d. Instance variable of type int and String are initialized to 0 and NULL respectively.<br />
20. a<br />
21. e<br />
22. a, b, d, e<br />
23. b, d, e, f<br />
24. d<br />
25. b, c<br />
26. a, b, c<br />
27. a<br />
28. d<br />
29. e<br />
30. a<br />
31. c, e<br />
32. e<br />
33. c<br />
34. e<br />
35. c<br />
Questions on Collections<br />
1. TreeMap class is used to implement which collection interface. Select the one correct answer.<br />
A. Set<br />
B. SortedSet<br />
C. List<br />
D. Map<br />
E. SortedMap<br />
2. Name the Collection interface implemented by the Vector class.<br />
3. Name the Collection interface implemented by the HashTable class.<br />
4. Name the Collection interface implemented by the HashSet class.<br />
5. Which of these are interfaces in the collection framework. Select all correct answers.<br />
A. Set<br />
B. List<br />
C. Array<br />
D. Vector<br />
E. LinkedList<br />
6. Which of these are interfaces in the collection framework. Select all correct answers.<br />
A. HashMap<br />
B. ArrayList<br />
C. Collection<br />
D. SortedMap<br />
E. TreeMap<br />
7. What is the name of collection interface used to maintain non-unique elements in order.<br />
8. What is the name of collection interface used to maintain unique elements.<br />
9. What is the name of collection interface used to maintain mappings pf keys to values.<br />
10. Is this true or false. Map interface is derived from the Collection interface.<br />
A. True<br />
B. False<br />
________________________________________<br />
Answers to questions on Layout Managers<br />
1. e<br />
2. List<br />
3. Map<br />
4. Set<br />
5. a,b<br />
6. c,d<br />
7. List<br />
8. Set<br />
9. Map<br />
10. b</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Questions on Events<br />
1. Name the method defined in EventObject class that returns the Object generated from the event. Select the one correct answer.<br />
A. getEvent()<br />
B. getObject()<br />
C. getID()<br />
D. getSource()<br />
2. What is the return type of the method getID() defined in AWTEvent class. Select the one correct answer.<br />
A. int<br />
B. long<br />
C. Object<br />
D. Component<br />
E. short<br />
3. Name the event which gets generated when a button is clicked. Select the one correct answer.<br />
A. KeyEvent<br />
B. MouseEvent<br />
C. ItemEvent<br />
D. ActionEvent<br />
4. Which event is generated when the position of a scrollbar is changed. Select the one correct answer.<br />
A. KeyEvent<br />
B. MouseEvent<br />
C. ItemEvent<br />
D. ActionEvent<br />
E. AdjustmentEvent<br />
5. Which of the following Objects can generate ActionEvent. Select all correct answer.<br />
A. List<br />
B. TextArea<br />
C. CheckBoxMenuItem<br />
D. Choice<br />
6. Which of the following Objects can generate ItemEvent. Select all correct answer.<br />
A. CheckBox<br />
B. Button<br />
C. List<br />
D. MenuItem<br />
7. Which method identifies the type of an event generated. Select the one correct answer.<br />
A. getSource()<br />
B. getType()<br />
C. getEventType()<br />
D. getID()<br />
8. Which of the following are legal adapter classes in Java. Select all correct answers.<br />
A. ActionAdapter<br />
B. ItemAdapter<br />
C. TextAdapter<br />
D. MouseAdapter<br />
E. MouseMotionAdapter<br />
9. Name the class of the argument of method actionPerformed() defined in the ActionListner interface.<br />
10. Which of these listner classes have corresponding adapter classes. Select all correct answers.<br />
A. ContainerListner<br />
B. TextListner<br />
C. ItemListner<br />
D. MouseMotionListner<br />
11. Which of these are valid adapter classes. Select all correct answers.<br />
A. ActionAdapter<br />
B. AdjustmentAdapter<br />
C. KeyAdapter<br />
D. TextAdapter<br />
12. Which of these methods are defined in MouseMotionListner interface. Select all correct answers.<br />
A. mouseClicked()<br />
B. mousePressed()<br />
C. mouseEntered()<br />
D. mouseDragged()<br />
E. mouseMoved()<br />
13. What is the return type of the method getSource() defined in EventObject class. Select the one correct answer.<br />
A. int<br />
B. long<br />
C. Object<br />
D. Component<br />
E. short<br />
________________________________________<br />
Answers to questions on Events<br />
1. d<br />
2. a<br />
3. d<br />
4. e<br />
5. a<br />
6. a, c<br />
7. d<br />
8. d, e<br />
9. ActionEvent<br />
10. a, d<br />
11. c<br />
12. d, e<br />
13. c<br />
<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 750 px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 654px;" valign="top"><div class="MsoNormal">
<b><span style="color: white;">Search Relevant Contents<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<style type="text/css">
@import url(http://www.google.com/cse/api/branding.css);
</style>
<br />
<div class="cse-branding-right" style="background-color: white; color: black;">
<div class="cse-branding-form">
<form action="http://techupdate.prayas.info" id="cse-search-box">
<div>
<input name="cx" type="hidden" value="partner-pub-0413634368644504:ndlxt6o2t86" />
<input name="cof" type="hidden" value="FORID:10" />
<input name="ie" type="hidden" value="ISO-8859-1" />
<input name="q" size="132" type="text" />
<input name="sa" type="submit" value="Search" />
</div>
</form>
</div>
<div class="cse-branding-logo">
<img alt="Google" src="http://www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif" />
</div>
<div class="cse-branding-text">
Custom Search
</div>
</div>
</div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<div id="cse-search-results">
</div>
<script type="text/javascript">
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchFrameWidth = 800;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";
</script>
<script src="http://www.google.com/afsonline/show_afs_search.js" type="text/javascript">
</script>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com103tag:blogger.com,1999:blog-7382811498705583939.post-21288810054147040082011-09-16T16:51:00.003-04:002011-09-22T15:42:37.800-04:00Java Interview Questions - Part2<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<b>Java aptitude/interview questions - <span style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><b>Part 2</b></span></b></div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"></strong><br />
Question 15) What will be output if you try to compile and run the following code, but there is no file called Hello.txt in the current directory?.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
import java.io.*;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public class Mine {<br />
public static void main(String argv[]){<br />
Mine m=new Mine();<br />
System.out.println(m.amethod());<br />
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public int amethod() {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
try {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
FileInputStream dis=new FileInputStream("Hello.txt");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}catch (FileNotFoundException fne) {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("No such file found");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
return -1;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}catch(IOException ioe) {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
} finally{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("Doing finally");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
return 0;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
1) No such file found<br />
2 No such file found ,-1<br />
3) No such file found, Doing finally, -1<br />
4) 0<br />
________________________________________<br />
Question 16)<br />
What tags are mandatory when creating HTML to display an applet<br />
1) name, height, width<br />
2) code, name<br />
3) codebase, height, width<br />
4) code, height, width<br />
________________________________________<br />
Question 17)<br />
What will happen if you attempt to compile and run the following code?<br />
1) Compile and run without error<br />
2) Compile time Exception<br />
3) Runtime Exception</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
class Base {}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
class Sub extends Base {}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
class Sub2 extends Base {}<br />
public class CEx{<br />
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Base b=new Base();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Sub s=(Sub) b;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
}<br />
________________________________________<br />
Question 18)<br />
If the following HTML code is used to display the applet in the code MgAp what will<br />
be displayed at the console?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) Error: no such parameter<br />
2) 0<br />
3) null<br />
4) 30</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
import java.applet.*;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
import java.awt.*;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public class MgAp extends Applet{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void init(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(getParameter("age"));</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 19)<br />
You are browsing the Java HTML documentation for information on the<br />
java.awt.TextField component. You want to create Listener code to respond to focus<br />
events. The only Listener method listed is addActionListener. How do you go about<br />
finding out about Listener methods?<br />
1) Define your own Listener interface according to the event to be tracked<br />
2) Use the search facility in the HTML documentation for the listener needed<br />
3) Move up the hierarchy in the HTML documentation to locate methods in base<br />
classes<br />
4) Subclass awt.event with the appropriate Listener method<br />
________________________________________<br />
Question 20)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What will be displayed when you attempt to compile and run the following code<br />
//Code start</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
import java.awt.*;<br />
public class Butt extends Frame{<br />
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Butt MyBut=new Butt();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
Butt(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Button HelloBut=new Button("Hello");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Button ByeBut=new Button("Bye");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
add(HelloBut);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
add(ByeBut);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
setSize(300,300);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
setVisible(true);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
//Code end<br />
1) Two buttons side by side occupying all of the frame, Hello on the left and Bye on<br />
the right<br />
2) One button occupying the entire frame saying Hello<br />
3) One button occupying the entire frame saying Bye<br />
4) Two buttons at the top of the frame one saying Hello the other saying Bye<br />
________________________________________</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 21)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What will be output by the following code?<br />
public class MyFor{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int i;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int j;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
outer:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
for (i=1;i <3;i++)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
inner:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
for(j=1; j<3; j++) {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
if (j==2)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
continue outer;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("Value for i=" + i + " Value for j=" +j);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) Value for i=1 value for j=1<br />
2) value for i=2 value for j=1<br />
3) value for i=2 value for j=2<br />
4 value for i=3 value for j=1<br />
________________________________________<br />
Question 22)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
If g is a graphics instance what will the following code draw on the screen?.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
g.fillArc(45,90,50,50,90,180);<br />
1) An arc bounded by a box of height 45, width 90 with a centre point of 50,50, starting<br />
at an angle of 90 degrees traversing through 180 degrees counter clockwise.<br />
2) An arc bounded by a box of height 50, width 50, with a centre point of 45,90 starting<br />
at an angle of 90 degrees traversing through 180 degrees clockwise.<br />
3) An arc bounded by a box of height 50, width 50, with a top left at coordinates of 45,<br />
90, starting at 90 degrees and traversing through 180 degrees counter clockwise.<br />
4) An arc starting at 45 degrees, traversing through 90 degrees clockwise bounded by a<br />
box of height 50, width 50 with a centre point of 90, 180.<br />
________________________________________<br />
Question 23)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Which of the following methods can be legally inserted in place of the comment //Method Here ?<br />
class Base{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void amethod(int i) { }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public class Scope extends Base{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
//Method Here</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) void amethod(int i) throws Exception {}<br />
2) void amethod(long i)throws Exception {}<br />
3) void amethod(long i){}<br />
4) public void amethod(int i) throws Exception {}<br />
________________________________________<br />
Question 24)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Which of the following will output -4.0<br />
1) System.out.println(Math.floor(-4.7));<br />
2) System.out.println(Math.round(-4.7));<br />
3) System.out.println(Math.ceil(-4.7));<br />
4) System.out.println(Math.Min(-4.7));<br />
________________________________________<br />
Question 25)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What will happen if you attempt to compile and run the following code?<br />
Integer ten=new Integer(10);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Long nine=new Long (9);<br />
System.out.println(ten + nine);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int i=1;<br />
System.out.println(i + ten);<br />
1) 19 followed by 20<br />
2) 19 followed by 11<br />
3) Error: Can't convert java lang Integer<br />
4) 10 followed by 1<br />
________________________________________<br />
Question 26)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
If you run the code below, what gets printed out?<br />
String s=new String("Bicycle");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int iBegin=1;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
char iEnd=3;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(s.substring(iBegin,iEnd));<br />
1) Bic<br />
2) ic<br />
3) icy<br />
4) error: no method matching substring(int,char)<br />
________________________________________<br />
Question 27)<br />
If you wanted to find out where the position of the letter v (ie return 2) in the string s<br />
containing "Java", which of the following could you use?<br />
1) mid(2,s);<br />
2) charAt(2);<br />
3) s.indexOf('v');<br />
4) indexOf(s,'v');<br />
________________________________________<br />
Question 28)<br />
Given the following declarations<br />
String s1=new String("Hello")</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
String s2=new String("there");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
String s3=new String();<br />
Which of the following are legal operations?<br />
1) s3=s1 + s2;<br />
2) s3=s1-s2;<br />
3) s3=s1 & s2<br />
4) s3=s1 && s2<br />
________________________________________<br />
Question 29)<br />
What is the result of the following operation?<br />
System.out.println(4 | 3);<br />
1) 6<br />
2) 0<br />
3) 1<br />
4) 7<br />
________________________________________<br />
Question 30)<br />
public class MyClass1 {<br />
public static void main(String argv[]){ }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
/*Modifier at XX */ class MyInner {}<br />
}<br />
What modifiers would be legal at XX in the above code?<br />
1) public<br />
2) private<br />
3) static<br />
4) friend<br />
________________________________________<br />
Question 31)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
How would you go about opening an image file called MyPicture.jpg<br />
1) Graphics.getGraphics("MyPicture.jpg");<br />
2) Image image=Toolkit.getDefaultToolkit().getImage("MyPicture.jpg");<br />
3) Graphics.openImage("MyPicture");<br />
4) Image m=new Image("MyPicture");<br />
________________________________________<br />
Question 32)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
An Applet has its Layout Manager set to the default of FlowLayout. What code would be correct to change to another Layout Manager.<br />
1) setLayoutManager(new GridLayout());<br />
2) setLayout(new GridLayout(2,2));<br />
3) setGridLayout(2,2,))<br />
4) setBorderLayout();<br />
________________________________________<br />
Question 33)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What will happen when you attempt to compile and run the following code?.<br />
1) It will compile and the run method will print out the increasing value of i.<br />
2) It will compile and calling start will print out the increasing value of i.<br />
3) The code will cause an error at compile time.<br />
4) Compilation will cause an error because while cannot take a parameter of true.<br />
class Background implements Runnable{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int i=0;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public int run(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
while(true){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
i++;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("i="+i);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
} //End while</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}//End run</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}//End class</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 34)<br />
You have created an applet that draws lines. You have overriden the paint operation and used the graphics drawLine method, and increase one of its parameters to multiple lines across the screen. When you first test the applet you find that the news lines are redrawn, but the old lines are erased. How can you modify your code to allow the old lines to stay on the screen instead of being cleared.<br />
1) Override repaint thus<br />
public void repaint(Graphics g){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
paint(g);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
2)Override update thus<br />
public void update(Graphics g) {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
paint(g);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
3) turn off clearing with the method setClear();<br />
4) Remove the drawing from the paint Method and place in the calling code<br />
________________________________________<br />
Question 35)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What will be the result when you attempt to compile and run the following code?.<br />
public class Conv{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Conv c=new Conv();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
String s=new String("ello");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
c.amethod(s);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void amethod(String s){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
char c='H';</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
c+=s;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(c);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) Compilation and output the string "Hello"<br />
2) Compilation and output the string "ello"<br />
3) Compilation and output the string elloH<br />
4) Compile time error<br />
________________________________________<br />
Question 36)<br />
Given the following code, what test would you need to put in place of the comment line?<br />
//place test here<br />
to result in an output of<br />
Equal<br />
public class EqTest{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
EqTest e=new EqTest();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
EqTest(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
String s="Java";</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
String s2="java";</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
//place test here {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("Equal");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}else</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("Not equal");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) if(s==s2)<br />
2) if(s.equals(s2)<br />
3) if(s.equalsIgnoreCase(s2))<br />
4)if(s.noCaseMatch(s2))<br />
________________________________________<br />
Question 37)<br />
Given the following code<br />
import java.awt.*;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public class SetF extends Frame{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
SetF s=new SetF();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
s.setSize(300,200);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
s.setVisible(true);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
How could you set the frame surface color to pink<br />
1)s.setBackground(Color.pink);<br />
2)s.setColor(PINK);<br />
3)s.Background(pink);<br />
4)s.color=Color.pink<br />
________________________________________<br />
Question 38)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
How can you change the current working directory using an instance of the File class called FileName?<br />
1) FileName.chdir("DirName")<br />
2) FileName.cd("DirName")<br />
3) FileName.cwd("DirName")<br />
4) The File class does not support directly changing the current directory.<br />
________________________________________<br />
Question 39)<br />
If you create a TextField with a constructor to set it to occupy 5 columns, what difference will it make if you use it with a proportional font (ie Times Roman) or a fixed pitch typewriter style font (Courier).<br />
1)With a fixed font you will see 5 characters, with a proportional it will depend on the width of the characters<br />
2)With a fixed font you will see 5 characters,with a proportional it will cause the field to expand to fit the text<br />
3)The columns setting does not affect the number of characters displayed<br />
4)Both will show exactly 5 characters<br />
________________________________________<br />
Question 40)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Given the following code how could you invoke the Base constructor that will print out the string "base constructor";<br />
class Base{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Base(int i){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("base constructor");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Base(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public class Sup extends Base{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Sup s= new Sup();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
//One</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Sup()</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
//Two</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void derived()</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
//Three</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) On the line After //One put Base(10);<br />
2) On the line After //One put super(10);<br />
3) On the line After //Two put super(10);<br />
4) On the line After //Three put super(10);<br />
________________________________________<br />
Question 41)<br />
Given the following code what will be output?<br />
public class Pass{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
static int j=20;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int i=10;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Pass p = new Pass();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
p.amethod(i);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(i);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(j);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void amethod(int x){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
x=x*2;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
j=j*2;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
1) Error: amethod parameter does not match variable<br />
2) 20 and 40<br />
3) 10 and 40<br />
4) 10, and 20<br />
________________________________________<br />
Question 42)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What code placed after the comment //For loop would populate the elements of the array ia[] with values of the variable i.?<br />
public class Lin{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Lin l = new Lin();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
l.amethod();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void amethod(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int ia[] = new int[4];</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
//Start For loop</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
ia[i]=i;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(ia[i]);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
}<br />
1) for(int i=0; i < ia.length(); i++)<br />
2) for (int i=0; i< ia.length(); i++)<br />
3) for(int i=1; i < 4; i++)<br />
4) for(int i=0; i< ia.length;i++)<br />
________________________________________<br />
Question 43)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What will be the result when you try to compile and run the following code?<br />
private class Base{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Base(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int i = 100;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(i);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public class Pri extends Base{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
static int i = 200;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Pri p = new Pri();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(i);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
1) Error at compile time<br />
2) 200<br />
3) 100 followed by 200<br />
4) 100<br />
________________________________________<br />
Question 44)<br />
What will the following code print out?<br />
public class Oct{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Oct o = new Oct();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
o.amethod();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void amethod(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int oi= 012;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(oi);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1)12<br />
2)012<br />
3)10<br />
4)10.0</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 45<br />
What will happen when you try compiling and running this code?<br />
public class Ref{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Ref r = new Ref();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
r.amethod(r);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void amethod(Ref r){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int i=99;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
multi(r);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(i);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void multi(Ref r){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
r.i = r.i*2;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) Error at compile time<br />
2) An output of 99<br />
3) An output of 198<br />
4) An error at runtime<br />
________________________________________<br />
Question 46)<br />
You need to create a class that will store a unique object elements. You do not need to sort these elements but they must be unique.<br />
What interface might be most suitable to meet this need?<br />
1)Set<br />
2)List<br />
3)Map<br />
4)Vector</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 47)<br />
Which of the following will successfully create an instance of the Vector class and add an element?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) Vector v=new Vector(99);<br />
v[1]=99;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
2) Vector v=new Vector();<br />
v.addElement(99);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
3) Vector v=new Vector();<br />
v.add(99);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
4 Vector v=new Vector(100);<br />
v.addElement("99");<br />
________________________________________<br />
Question 48)<br />
You have created a simple Frame and overridden the paint method as follows<br />
public void paint(Graphics g){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
g.drawString("Dolly",50,10);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What will be the result when you attempt to compile and run the program?<br />
1) The string "Dolly" will be displayed at the centre of the frame<br />
2) An error at compilation complaining at the signature of the paint method<br />
3) The lower part of the word Dolly will be seen at the top of the form, with the top hidden.<br />
4) The string "Dolly" will be shown at the bottom of the form<br />
________________________________________<br />
Question 49)<br />
What will be the result when you attempt to compile this program?<br />
public class Rand{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int iRand;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
iRand = Math.random();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(iRand);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
1) Compile time error referring to a cast problem<br />
2) A random number between 1 and 10<br />
3) A random number between 0 and 1<br />
4) A compile time error about random being an unrecognised method<br />
________________________________________<br />
Question 50)<br />
Given the following code<br />
import java.io.*;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public class Th{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Th t = new Th();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
t.amethod();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void amethod(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
try{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
ioCall();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}catch(IOException ioe){}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
What code would be most likely for the body of the ioCall method<br />
1) public void ioCall ()throws IOException{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
DataInputStream din = new DataInputStream(System.in);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
din.readChar();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
2) public void ioCall ()throw IOException{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
DataInputStream din = new DataInputStream(System.in);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
din.readChar();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
3) public void ioCall (){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
DataInputStream din = new DataInputStream(System.in);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
din.readChar();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
4) public void ioCall throws IOException(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
DataInputStream din = new DataInputStream(System.in);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
din.readChar();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
________________________________________<br />
Question 51)<br />
What will happen when you compile and run the following code?<br />
public class Scope{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
private int i;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Scope s = new Scope();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
s.amethod();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}//End of main</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void amethod(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(i);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}//end of amethod</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}//End of class<br />
1) A value of 0 will be printed out<br />
2) Nothing will be printed out<br />
3) A compile time error<br />
4) A compile time error complaining of the scope of the variable i<br />
________________________________________<br />
Question 52)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
You want to lay out a set of buttons horizontally but with more space between the first button and the rest. You are going to use the GridBagLayout manager to control the way the buttons are set out. How will you modify the way the GridBagLayout acts in order to change the spacing around the first button?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) Create an instance of the GridBagConstraints class, call the weightx() method and then pass the GridBagConstraints instance with the component to the setConstraints method of the GridBagLayout class.<br />
2) Create an instance of the GridBagConstraints class, set the weightx field and then pass the GridBagConstraints instance with the component to the setConstraints method of the GridBagLayout class.<br />
3) Create an instance of the GridBagLayout class, set the weightx field and then call the setConstraints method of the GridBagLayoutClass with the component as a parameter.<br />
4) Create an instance of the GridBagLayout class, call the setWeightx() method and then pass the GridBagConstraints instance with the component to the setConstraints method of the GridBagLayout class.<br />
________________________________________<br />
Question 53)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Which of the following can you perform using the File class?<br />
1) Change the current directory<br />
2) Return the name of the parent directory<br />
3) Delete a file<br />
4) Find if a file contains text or binary information<br />
________________________________________<br />
Question 54)<br />
Which of the following code fragments will compile without error<br />
1)<br />
public void paint(Graphics g){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int polyX[] = {20,150,150};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int polyY[]= {20,20,120};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
g.drawPolygon(polyX, polyY,3);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
2)<br />
public void paint(Graphics g){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int polyX[] = {20,150,150};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int polyY[]= {20,20,120};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
g.drawPolygon(polyX, polyY);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
3)<br />
public void paint(Graphics g){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int polyX[3] = {20,150,150};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int polyY[3]= {20,20,120};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
g.drawPolygon(polyX, polyY,3);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
4)<br />
public void paint(Graphics g){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int polyX[] = {20,150,150};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int polyY[]= {20,20,120};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
drawPolygon(polyX, polyY);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
________________________________________<br />
Question 55)<br />
You are concerned about that your program may attempt to use more memory than is available. To avoid this situation you want to ensure that the Java Virtual Machine will run its garbage collection just before you start a complex routine. What can you do to be certain that garbage collection will run when you want .<br />
1) You cannot be certain when garbage collection will run<br />
2) Use the Runtime.gc() method to force garbage collection<br />
3) Ensure that all the variables you require to be garbage collected are set to null<br />
4) Use the System.gc() method to force garbage collection<br />
________________________________________<br />
Question 56)<br />
You are using the GridBagLayout manager to place a series of buttons on a Frame. You want to make the size of one of the buttons bigger than the text it contains. Which of the following will allow you to do that?<br />
1) The GridBagLayout manager does not allow you to do this<br />
2) The setFill method of the GridBagLayout class<br />
3) The setFill method of the GridBagConstraints class<br />
4) The fill field of the GridBagConstraints class</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 57)<br />
Which of the following most closely describes a bitset collection?<br />
1) A class that contains groups of unique sequences of bits<br />
2) A method for flipping individual bits in instance of a primitive type<br />
3) An array of boolean primitives that indicate zeros or ones<br />
4) A collection for storing bits as on-off information, like a vector of bits<br />
________________________________________<br />
Question 58)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
You have these files in the same directory. What will happen when you attempt to compile and run Class1.java if you have not already compiled Base.java<br />
//Base.java<br />
package Base;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
class Base{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
protected void amethod(){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("amethod");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}//End of amethod</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}//End of class base<br />
package Class1;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
//Class1.java</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public class Class1 extends Base{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Base b = new Base();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
b.amethod();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}//End of main</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}//End of Class1</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) Compile Error: Methods in Base not found<br />
2) Compile Error: Unable to access protected method in base class<br />
3) Compilation followed by the output "amethod"<br />
4)Compile error: Superclass Class1.Base of class Class1.Class1 not found</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 59)<br />
What will happen when you attempt to compile and run the following code<br />
class Base{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
private void amethod(int iBase){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("Base.amethod");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
class Over extends Base{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Over o = new Over();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int iBase=0;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
o.amethod(iBase);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public void amethod(int iOver){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("Over.amethod");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) Compile time error complaining that Base.amethod is private<br />
2) Runtime error complaining that Base.amethod is private<br />
3) Output of Base.amethod<br />
4) Output of Over.amethod()</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 60)<br />
You are creating an applet with a Frame that contains buttons. You are using the GridBagLayout manager and you have added Four buttons. At the moment the buttons appear in the centre of the frame from left to right. You want them to appear one on top of the other going down the screen. What is the most appropriate way to do this.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1) Set the gridy value of the GridBagConstraint class to a value increasing from 1 to 4<br />
2) set the fill value of the GridBagConstrint class to VERTICAL<br />
3) Set the ipady value of the GridBagConstraint class to a value increasing from 0 to 4<br />
4) Set the fill value of the GridBagLayout class to GridBag.VERTICAL<br />
________________________________________<br />
Answers<br />
________________________________________<br />
Answer 1)<br />
5) int i=10;<br />
explanation:<br />
1) float f=1.3;<br />
Will not compile because the default type of a number with a floating point component is a double. This would compile with a cast as in<br />
float f=(float) 1.3</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
2) char c="a";<br />
Will not compile because a char (16 bit unsigned integer) must be defined with single quotes. This would compile if it were in the form<br />
char c='a';<br />
3) byte b=257;<br />
Will not compile because a byte is eight bits. Take of one bit for the sign component you can define numbers between<br />
-127 to +127<br />
4) a boolean value can either be true of false, null is not allowed.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 2)<br />
1) Can't make static reference to void a method.<br />
Because main is defined as static you need to create an instance of the class in order to call any non-static methods. Thus a typical way to do this would be.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
MyClass m=new MyClass();<br />
m.amethod();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer 2 is an attempt to confuse because the convention is for a main method to be in the form<br />
String argv[]<br />
That argv is just a convention and any acceptable identifier for a string array can be used. Answers 3 and 4 are just nonsense.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer 3)<br />
2 and 3 will compile without error.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1 will not compile because any package declaration must come before any other code. Comments may appear anywhere.<br />
________________________________________<br />
Answer 4)<br />
1) A byte is a signed 8 bit integer.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 5)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
4) Exception raised: "java.lang.ArrayIndexOutOfBoundsException: 2"<br />
Unlike C/C++ java does not start the parameter count with the program name. It does however start from zero. So in this case zero starts with good, morning would be 1 and there is no parameter 2 so an exception is raised.<br />
________________________________________<br />
Answer 6)<br />
1) if<br />
3) goto<br />
4) while<br />
5) case</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
then is not a Java keyword, though if you are from a VB background you might think it was. Goto is a reserved word in Java.<br />
________________________________________<br />
Answer 7)<br />
2) variable2<br />
3) _whatavariable<br />
4) _3_<br />
5) $anothervar</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
An identifier can begin with a letter (most common) or a dollar sign($) or an underscore(_). An identifier cannot start with anything else such as a number, a hash, # or a dash -. An identifier cannot have a dash in its body, but it may have an underscore _. Choice 4) _3_ looks strange but it is an acceptable, if unwise form for an identifier.<br />
________________________________________</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer 8)<br />
4) 0<br />
Class level variables are always initialised to default values. In the case of an int this will be 0. Method level variables are not given default values and if you attempt to use one before it has been initialised it will cause the<br />
Error Variable i may not have been initialized<br />
type of error.<br />
________________________________________<br />
Answer 9)<br />
3 ) 2<br />
No error will be triggered.<br />
Like in C/C++, arrays are always referenced from 0. Java allows an array to be populated at creation time. The size of array is taken from the number of initializers. If you put a size within any of the square brackets you will get an error.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 10)<br />
3) 0<br />
Arrays are always initialised when they are created. As this is an array of ints it will be initalised with zeros.<br />
________________________________________</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer 11)<br />
3) Error Mine must be declared abstract</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A class that contains an abstract method must itself be declared as abstract. It may however contain non abstract methods. Any class derived from an abstract class must either define all of the abstract methods or be declared abstract itself.<br />
________________________________________</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer 12)<br />
3) one, two, default<br />
Code will continue to fall through a case statement until it encounters a break.<br />
________________________________________<br />
Answer 13)<br />
2) default, zero<br />
Although it is normally placed last the default default statement does not have to be the last item as you fall through the case bock Because there is no case label found matching the expression the default label is executed and the code continues to fall through until it encounters a break.<br />
________________________________________<br />
Answer 14)<br />
2,3<br />
Example 1 will not compile because if must always test a boolean. This can catch out C/C++ programmers who expect the test to be for either 0 or not 0.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 15)<br />
3) No such file found, doing finally, -1<br />
The no such file found message is to be expected, however you can get caught out if you are not aware that the finally clause is almost always executed, even if there is a return statement.<br />
________________________________________<br />
Answer 16)<br />
4) code, height, width</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 17)<br />
3) Runtime Exception<br />
Without the cast to sub you would get a compile time error. The cast tells the compiler that you really mean to do this and the actual type of b does not get resolved until runtime. Casting down the object hierarchy as the compiler cannot be sure what has been implemented in descendent classes. Casting up is not a problem because sub classes will have the features of the base classes. This can feel counter intuitive if you are aware that with primitives casting is allowed for widening operations (ie byte to int).</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 18)<br />
3) null<br />
If a parameter is not available the applet will still run, but any attempt to access the parameter will return a null.<br />
________________________________________<br />
Answer 19)<br />
3) Move up the hierarchy in the HTML documentation to locate methods in base<br />
classes<br />
The documentation created by JavaDoc is based on tags placed into the sourcecode. The convention for documentation is that methods and fields of ancestors are not duplicated in sub classes. So if you are looking for something and it does not appear to be there, you move up the class hierarchy to find it.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 20)<br />
3) One button occupying the entire frame saying Bye<br />
The default layout manager for a Frame is a border layout. If directions are not given (ie North, South, East or West), any button will simply go in the centre and occupy all the space. An additional button will simply be placed over the previous button. What you would probably want in a real example is to set up a flow layout as in<br />
setLayout(new FlowLayout()); which would.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Applets and panels have a default FlowLayout manager</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 21)<br />
1,2<br />
Value for i=1 Value for j=1<br />
Value for i=2 Value for j=1</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
The statement continue outer causes the code to jump to the label outer and the for loop increments to the next number.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 22)<br />
3) An arc bounded by a box of height 50, width 50, with a top left at coordinates of 45,<br />
90, starting at 90 degrees and traversing through 180 degrees counter clockwise.<br />
fillArc(int x, int y, int width, int height, int startDegrees, int arcDegrees)<br />
The fillArc function draws an arc in a box with a top left at coordinates X & Y.<br />
If the ArcDegrees is a positive number the arc is drawn counter clockwise.<br />
________________________________________</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer 23)<br />
2,4<br />
Options 1, & 4 will not compile as they attempt to throw Exceptions not declared in the base class. Because options 2 and 4 take a parameter of type long they represent overloading not overriding and there is no such limitations on overloaded methods.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 24)<br />
3) System.out.println(Math.ceil(-4.7));<br />
Options 1 and 2 will produce -5 and option 4 will not compile because the Min method requires 2 parameters.<br />
________________________________________<br />
Answer 25)<br />
3) Error: Cant convert java lang Integer<br />
The wrapper classes cannot be used like primitives.<br />
Wrapper classes have similar names to primitives but all start with upper case letters.<br />
Thus in this case we have int as a primitive and Integer as a wrapper. The objectives do not specifically mention the wrapper classes but don't be surprised if they come up.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 26)<br />
2) ic<br />
This is a bit of a catch question. Anyone with a C/C++ background would figure out that addressing in strings starts with 0 so that 1 corresponds to i in the string Bicycle. The catch is that the second parameter returns the endcharacter minus 1. In this case it means instead of the "icy" being returned as intuition would expect it is only "ic".</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 27)<br />
3) s.indexOf('v');<br />
charAt returns the letter at the position rather than searching for a letter and returning the position, MID is just to confuse the Basic Programmers, indexOf(s,'v'); is how some future VB/J++ nightmare hybrid, might perform such a calculation.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 28)<br />
1) s3=s1 + s2;<br />
Java does not allow operator overloading as in C++, but for the sake of convenience the + operator is overridden for strings.<br />
________________________________________<br />
Answer 29)<br />
4) 7<br />
The | is known as the Or operator, you could think of it as the either/or operator. Turning the numbers into binary gives<br />
4=100<br />
3=011<br />
For each position, if either number contains a 1 the result will contain a result in that position. As every position contains a 1 the result will be<br />
111<br />
Which is decimal 7.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 30)<br />
1,2,3<br />
public, private, static are all legal access modifiers for this inner class.<br />
________________________________________<br />
Answer 31)<br />
Opening an image file requires an Image object, The Image class has no constructor that takes the name of an image file . For an application (rather than an applet) an image is created using the Toolkit class as in option 2.<br />
2) Image image=Toolkit.getDefaultToolkit().getImage("MyPicture.jpg");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 32)<br />
2) setLayout(new GridLayout(2,2));</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Changing the layout manager is the same for an Applet or an application. Answer 1 is wrong and implausible as a standard method is unlikely to have a name as long as setLayoutManager. Answers 3 and 4 are incorrect because changing the layout manager always requires an instance of one of the Layout Managers and these are bogus methods.<br />
Instead of creating the anonymous instance of the Layout manager as in option 2 you can also create a named instance and pass that as a parameter. This is often what automatic code generators such as Borland/Inprise JBuilder do.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 33)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
3) The code will cause an error at compile time<br />
The error is caused because run should have a void not an int return type.<br />
Any class that is implements an interface must create a method to match all of the methods in the interface. The Runnable interface has one method called run that has a void return type.The sun compiler gives the error<br />
Method redefined with different return type: int run() was defined as void run();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 34)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
2) public void update(Graphics g) {<br />
paint(g);<br />
}<br />
If not overridden the update method clears the background and calls paint(); By overriding the update method, any previously drawn graphics will not be cleared. This is only a trivial way of preserving any graphics drawn. If the application is resized or the drawing area covered in some way the graphics will be cleared.<br />
________________________________________<br />
Answer 35)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
4) Compile time error</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
The only operator overloading offered by java is the + sign for the String class. A char is a 16 bit integer and cannot be concatenated to a string with the + operator.<br />
________________________________________<br />
Answer 36)<br />
3) if(s.equalsIgnoreCase(s2))<br />
String comparison is case sensitive so using the equals string method will not return a match. Using the==operator just compares where memory address of the references and noCaseMatch was just something I made up to give me a fourth slightly plausible option.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Answer 37)<br />
1) s.setBackground(Color.pink);<br />
For speakers of the more British spelt English note that there is no letter u in Color. Also the constants for colors are in lower case.<br />
________________________________________<br />
Answer 38)<br />
4) The File class does not support directly changing the current directory.<br />
This seems rather surprising to me, as changing the current directory is a very common requirement. You may be able to get around this limitation by creating a new instance of the File class passing the new directory to the constructor as the path name.<br />
________________________________________<br />
Answer 39)<br />
1)With a fixed font you will see 5 characters, with a proportional it will depend on the width of the characters<br />
With a proportional font the letter w will occupy more space than the letter i. So if you have all wide characters you may have to scroll to the right to see the entire text of a TextField.<br />
________________________________________<br />
Answer 40)<br />
3) On the line After //Two put super(10);<br />
Constructors can only be invoked from within constructors.<br />
________________________________________<br />
Answer 41)<br />
3) 10 and 40<br />
when a parameter is passed to a method the method receives a copy of the value. The method can modify its value without affecting the original copy. Thus in this example when the value is printed out the method has not changed the value.<br />
________________________________________<br />
Answer 42)<br />
4) for(int i=0; i< ia.length;i++)<br />
Although you could control the looping with a literal number as with the number 4 used in sample 3, it is better practice to use the length property of an array. This provides against bugs that might result if the size of the array changes. This question also checks that you know that arrays starts from zero and not One.<br />
________________________________________<br />
Answer 43)<br />
1) Error at compile time<br />
This is a slightly sneaky one as it looks like a question about constructors, but it is attempting to test knowledge of the use of the private modifier. A top level class cannot be defined as private. If you didn't notice the modifier private, remember in the exam to be real careful to read every part of the question.<br />
________________________________________<br />
Answer 44)<br />
3)10<br />
The name of the class might give you a clue with this question, Oct for Octal. Prefixing a number with a zero indicates that it is in Octal format. Thus when printed out it gets converted to base ten. 012 in octal means the first column from the right has a value of 2 and the next along has a value of one times eight. In decimal that adds up to 10.<br />
________________________________________<br />
Answer 45)<br />
1) Error at compile time<br />
The variable i is created at the level of amethod and will not be available inside the method multi.<br />
________________________________________<br />
Answer 46)<br />
1) Set<br />
The Set interface ensures that its elements are unique, but does not order the elements. In reality you probably wouldn't create your own class using the Set interface. You would be more likely to use one of the JDK classes that use the Set interface such as ArraySet.<br />
________________________________________<br />
Answer 47)<br />
4) Vector v=new Vector(100);<br />
v.addElement("99")<br />
A vector can only store objects not primitives. The parameter "99" for the addElement method pases a string object to the Vector. Option 1) creates a vector OK but then uses array syntax to attempt to assign a primitive. Option 2 also creates a vector then uses correct Vector syntax but falls over when the parameter is a primitive instead of an object. Option 3 compounds the errors by using the fictitious add method.<br />
________________________________________<br />
Answer 48)<br />
3) The lower part of the word Dolly will be seen at the top of the form<br />
The Second parameter to the drawstring method indicates where the baseline of the string will be placed. Thus the 3rd parameter of 10 indicates the Y coordinate to be 10 pixels from the top of the Frame. This will result in just the bottom of the string Dolly showing up or possibly only the descending part of the letter y.<br />
________________________________________<br />
Answer 49)<br />
1) Compile time error referring to a cast problem<br />
This is a bit of a sneaky one as the Math.random method returns a pseudo random number between 0 and 1, and thus option 3 is a plausible answer. However the number returned is a double and so the compiler will complain that a cast is needed to convert a double to an int.<br />
________________________________________<br />
Answer 50)<br />
1) public void ioCall ()throws IOException{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
DataInputStream din = new DataInputStream(System.in);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
din.readChar();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
If a method might throw an exception it must either be caught within the method with a try/catch block, or the method must indicate the exception to any calling method by use of the throws statement in its declaration. Without this, an error will occur at compile time.<br />
________________________________________<br />
Answer 51)<br />
3) A compile time error<br />
Because only one instance of a static method exists not matter how many instance of the class exists it cannot access any non static variables. The JVM cannot know which instance of the variable to access. Thus you will get an error saying something like<br />
Can't make a static reference to a non static variable<br />
________________________________________<br />
Answer 52)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
2) Create an instance of the GridBagConstraints class, set the weightx field and then pass the GridBagConstraints instance with the component to the setConstraints method of the GridBagLayout class.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
The Key to using the GridBagLayout manager is the GridBagConstraint class. This class is not consistent with the general naming conventions in the java API as you would expect that weightx would be set with a method, whereas it is a simple field (variable).<br />
________________________________________<br />
Answer 53)<br />
2) Return the name of the parent directory<br />
3) Delete a file<br />
It is surprising that you can't change the current directory. If you need to do this, the best way seems to be to create a new instance of the File class and pass the new directory to the constructor. It is not so surprising that you can't tell if a file contains text or binary information.<br />
________________________________________<br />
Answer 54)<br />
1)<br />
public void paint(Graphics g){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int polyX[] = {20,150,150};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int polyY[]= {20,20,120};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
g.drawPolygon(polyX, polyY,3);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
Drawpolygon takes three parameters, the first two are arrays of the X,Y coordinates and the final is n integer specifying the number of vertices (whatever they are).<br />
________________________________________<br />
Answer 55)<br />
1) You cannot be certain when garbage collection will run<br />
Although there is a Runtime.gc(), this only suggests that the Java Virtual Machine does its garbage collection. You can never be certain when the garbage collector will run. Roberts and Heller is more specific abou this than Boone. This uncertainty can cause consternation for C++ programmers who wish to run finalize methods with the same intent as they use destructor methods.<br />
________________________________________<br />
Answer 56)<br />
4) The fill field of the GridBagConstraints class<br />
Unlike the GridLayout manager you can set the individual size of a control such as a button using the GridBagLayout manager. A little background knowledge would indicate that it should be controlled by a setSomethingOrOther method, but it isn't.<br />
________________________________________<br />
Answer 57)<br />
4) A collection for storing bits as on-off information, like a vector of bits<br />
This is the description given to a bitset in Bruce Eckels "Thinking in Java" book. The reference to unique sequence of bits was an attempt to mislead because of the use of the word Set in the name bitset. Normally something called a set implies uniqueness of the members, but not in this context.<br />
________________________________________<br />
Answer 58)<br />
4)Compile error: Superclass Class1.Base of class Class1.Class1 not found<br />
Using the package statement has an effect similar to placing a source file into a different directory. Because the files are in different packages they cannot see each other. The stuff about File1 not having been compiled was just to mislead, java has the equivalent of an "automake", whereby if it was not for the package statements the other file would have been automatically compiled.<br />
________________________________________<br />
Answer 59)<br />
4) Output of Over.amethod()<br />
The names of parameters to an overridden method is not important.<br />
________________________________________<br />
Answer 60)<br />
1) Set the gridy value of the GridBagConstraint class to a value increasing from 1 to 4<br />
Answer 4 is fairly obviously bogus as it is the GridBagConstraint class that does most of the magic in laying out components under the GridBagLayout manager. The fill value of the GridBagConstraint class controls the behavior inside its virtual cell and the ipady field controls the internal padding around a component.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
STRING HANDLING<br />
1. Which package does define String and StringBuffer classes?<br />
Ans : java.lang package.<br />
2. Which method can be used to obtain the length of the String?<br />
Ans : length( ) method.<br />
3. How do you concatenate Strings?<br />
Ans : By using " + " operator.<br />
4. Which method can be used to compare two strings for equality?<br />
Ans : equals( ) method.<br />
5. Which method can be used to perform a comparison between strings that ignores case differences?<br />
Ans : equalsIgnoreCase( ) method.<br />
6. What is the use of valueOf( ) method?<br />
Ans : valueOf( ) method converts data from its internal format into a human-readable form.<br />
7. What are the uses of toLowerCase( ) and toUpperCase( ) methods?<br />
Ans : The method toLowerCase( ) converts all the characters in a string from uppercase to<br />
lowercase.<br />
The method toUpperCase( ) converts all the characters in a string from lowercase to<br />
uppercase.<br />
8. Which method can be used to find out the total allocated capacity of a StrinBuffer?<br />
Ans : capacity( ) method.<br />
9. Which method can be used to set the length of the buffer within a StringBuffer object?<br />
Ans : setLength( ).<br />
10. What is the difference between String and StringBuffer?<br />
Ans : String objects are constants, whereas StringBuffer objects are not.<br />
String class supports constant strings, whereas StringBuffer class supports growable, modifiable strings.<br />
11. What are wrapper classes?<br />
Ans : Wrapper classes are classes that allow primitive types to be accessed as objects.<br />
12. Which of the following is not a wrapper class?<br />
a. String<br />
b. Integer<br />
c. Boolean<br />
d. Character<br />
Ans : a.<br />
1. What is the output of the following program?<br />
public class Question {<br />
public static void main(String args[]) {<br />
String s1 = "abc";<br />
String s2 = "def";<br />
String s3 = s1.concat(s2.toUpperCase( ) );<br />
System.out.println(s1+s2+s3);<br />
}<br />
}<br />
a. abcdefabcdef<br />
b. abcabcDEFDEF<br />
c. abcdefabcDEF<br />
d. None of the above<br />
ANS : c.<br />
1. Which of the following methods are methods of the String class?<br />
a. delete( )<br />
b. append( )<br />
c. reverse( )<br />
d. replace( )<br />
Ans : d.<br />
1. Which of the following methods cause the String object referenced by s to be changed?<br />
a. s.concat( )<br />
b. s.toUpperCase( )<br />
c. s.replace( )<br />
d. s.valueOf( )<br />
Ans : a and b.<br />
1. String is a wrapper class?<br />
a. True<br />
b. False<br />
Ans : b.<br />
17) If you run the code below, what gets printed out?<br />
String s=new String("Bicycle");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int iBegin=1;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
char iEnd=3;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(s.substring(iBegin,iEnd));<br />
a. Bic<br />
b. ic<br />
c) icy<br />
d) error: no method matching substring(int,char)<br />
Ans : b.<br />
18) Given the following declarations<br />
String s1=new String("Hello")</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
String s2=new String("there");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
String s3=new String();<br />
Which of the following are legal operations?<br />
a. s3=s1 + s2;<br />
b. s3=s1 - s2;<br />
c) s3=s1 & s2<br />
d) s3=s1 && s2<br />
Ans : a.<br />
19) Which of the following statements are true?<br />
a. The String class is implemented as a char array, elements are addressed using the stringname[] convention<br />
b) Strings are a primitive type in Java that overloads the + operator for concatenation<br />
c) Strings are a primitive type in Java and the StringBuffer is used as the matching wrapper type<br />
d) The size of a string can be retrieved using the length property.<br />
Ans : b.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
EXPLORING JAVA.LANG<br />
1. java.lang package is automatically imported into all programs.<br />
a. True<br />
b. False<br />
Ans : a<br />
1. What are the interfaces defined by java.lang?<br />
Ans : Cloneable, Comparable and Runnable.<br />
2. What are the constants defined by both Flaot and Double classes?<br />
Ans : MAX_VALUE,<br />
MIN_VALUE,<br />
NaN,<br />
POSITIVE_INFINITY,<br />
NEGATIVE_INFINITY and<br />
TYPE.<br />
3. What are the constants defined by Byte, Short, Integer and Long?<br />
Ans : MAX_VALUE,<br />
MIN_VALUE and<br />
TYPE.<br />
4. What are the constants defined by both Float and Double classes?<br />
Ans : MAX_RADIX,<br />
MIN_RADIX,<br />
MAX_VALUE,<br />
MIN_VALUE and<br />
TYPE.<br />
5. What is the purpose of the Runtime class?<br />
Ans : The purpose of the Runtime class is to provide access to the Java runtime system.<br />
6. What is the purpose of the System class?<br />
Ans : The purpose of the System class is to provide access to system resources.<br />
7. Which class is extended by all other classes?<br />
Ans : Object class is extended by all other classes.<br />
8. Which class can be used to obtain design information about an object?<br />
Ans : The Class class can be used to obtain information about an object’s design.<br />
9. Which method is used to calculate the absolute value of a number?<br />
Ans : abs( ) method.<br />
10. What are E and PI?<br />
Ans : E is the base of the natural logarithm and PI is the mathematical value pi.<br />
11. Which of the following classes is used to perform basic console I/O?<br />
a. System<br />
b. SecurityManager<br />
c. Math<br />
d. Runtime<br />
Ans : a.<br />
1. Which of the following are true?<br />
a. The Class class is the superclass of the Object class.<br />
b. The Object class is final.<br />
c. The Class class can be used to load other classes.<br />
d. The ClassLoader class can be used to load other classes.<br />
Ans : c and d.<br />
1. Which of the following methods are methods of the Math class?<br />
a. absolute( )<br />
b. log( )<br />
c. cosine( )<br />
d. sine( )<br />
Ans : b.<br />
1. Which of the following are true about the Error and Exception classes?<br />
a. Both classes extend Throwable.<br />
b. The Error class is final and the Exception class is not.<br />
c. The Exception class is final and the Error is not.<br />
d. Both classes implement Throwable.<br />
Ans : a.<br />
1. Which of the following are true?<br />
a. The Void class extends the Class class.<br />
b. The Float class extends the Double class.<br />
c. The System class extends the Runtime class.<br />
d. The Integer class extends the Number class.<br />
Ans : d.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
17) Which of the following will output -4.0<br />
a. System.out.println(Math.floor(-4.7));<br />
b. System.out.println(Math.round(-4.7));<br />
c. System.out.println(Math.ceil(-4.7));<br />
d) System.out.println(Math.Min(-4.7));<br />
Ans : c.<br />
18) Which of the following are valid statements<br />
a) public class MyCalc extends Math<br />
b) Math.max(s);<br />
c) Math.round(9.99,1);<br />
d) Math.mod(4,10);<br />
e) None of the above.<br />
Ans : e.<br />
19) What will happen if you attempt to compile and run the following code?<br />
Integer ten=new Integer(10);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Long nine=new Long (9);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(ten + nine);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int i=1;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(i + ten);<br />
a. 19 followed by 20<br />
b. 19 followed by 11<br />
c. Error: Can't convert java lang Integer<br />
d) 10 followed by 1<br />
Ans : c.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
INPUT / OUTPUT : EXPLORING JAVA.IO<br />
1. What is meant by Stream and what are the types of Streams and classes of the Streams?<br />
Ans : A Stream is an abstraction that either produces or consumes information.<br />
There are two types of Streams. They are:<br />
Byte Streams : Byte Streams provide a convenient means for handling input and output of bytes.<br />
Character Streams : Character Streams provide a convenient means for handling input and output of characters.<br />
Byte Stream classes : Byte Streams are defined by using two abstract classes. They are:InputStream and OutputStream.<br />
Character Stream classes : Character Streams are defined by using two abstract classes. They are : Reader and Writer.<br />
2. Which of the following statements are true?<br />
a. UTF characters are all 8-bits.<br />
b. UTF characters are all 16-bits.<br />
c. UTF characters are all 24-bits.<br />
d. Unicode characters are all 16-bits.<br />
e. Bytecode characters are all 16-bits.<br />
Ans : d.<br />
1. Which of the following statements are true?<br />
a. When you construct an instance of File, if you do not use the filenaming semantics of the local machine, the constructor will throw an IOException.<br />
b. When you construct an instance of File, if the corresponding file does not exist on the local file system, one will be created.<br />
c. When an instance of File is garbage collected, the corresponding file on the local file system is deleted.<br />
d. None of the above.<br />
Ans : a,b and c.<br />
1. The File class contains a method that changes the current working directory.<br />
a. True<br />
b. False<br />
Ans : b.<br />
1. It is possible to use the File class to list the contents of the current working directory.<br />
a. True<br />
b. False<br />
Ans : a.<br />
1. Readers have methods that can read and return floats and doubles.<br />
a. True<br />
b. False<br />
Ans : b.<br />
1. You execute the code below in an empty directory. What is the result?<br />
File f1 = new File("dirname");<br />
File f2 = new File(f1, "filename");<br />
a. A new directory called dirname is created in the current working directory.<br />
b. A new directory called dirname is created in the current working directory. A new file called filename is created in directory dirname.<br />
c. A new directory called dirname and a new file called filename are created, both in the current working directory.<br />
d. A new file called filename is created in the current working directory.<br />
e. No directory is created, and no file is created.<br />
Ans : e.<br />
1. What is the difference between the Reader/Writer class hierarchy and the<br />
InputStream/OutputStream class hierarchy?<br />
Ans : The Reader/Writer class hierarchy is character-oriented and the InputStream/OutputStream class hierarchy is byte-oriented.<br />
2. What is an I/O filter?<br />
Ans : An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another.<br />
3. What is the purpose of the File class?<br />
Ans : The File class is used to create objects that provide access to the files and directories of a local file system.<br />
4. What interface must an object implement before it can be written to a stream as an object?<br />
Ans : An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.<br />
5. What is the difference between the File and RandomAccessFile classes?<br />
Ans : The File class encapsulates the files and directories of the local file system. The RandomAccessFile class provides the methods needed to directly access data contained in any part of a file.<br />
6. What class allows you to read objects directly from a stream?<br />
Ans : The ObjectInputStream class supports the reading of objects from input streams.<br />
7. What value does read( ) return when it has reached the end of a file?<br />
Ans : The read( ) method returns – 1 when it has reached the end of a file.<br />
8. What value does readLine( ) return when it has reached the end of a file?<br />
Ans : The readLine( ) method returns null when it has reached the end of a file.<br />
9. How many bits are used to represent Unicode, ASCII, UTF-16 and UTF-8 characters?<br />
Ans : Unicode requires 16-bits and ASCII requires 8-bits. Although the ASCII character set uses only 1-bits, it is usually represented as 8-bits. UTF-8 represents characters using 8, 16 and 18-bit patterns. UTF-16 uses 16-bit and larger bit patterns.<br />
10. Which of the following are true?<br />
a. The InputStream and OutputStream classes are byte-oriented.<br />
b. The ObjectInputStream and ObjectOutputStream do not support serialized object input and output.<br />
c. The Reader and Writer classes are character-oriented.<br />
d. The Reader and Writer classes are the preferred solution to serialized object output.<br />
Ans : a and c.<br />
1. Which of the following are true about I/O filters?<br />
a. Filters are supported on input, but not on output.<br />
b. Filters are supported by the InputStream/OutputStream class hierarchy, but not by the Reader/Writer class hierarchy.<br />
c. Filters read from one stream and write to another.<br />
d. A filter may alter data that is read from one stream and written to another.<br />
Ans : c and d.<br />
1. Which of the following are true?<br />
a. Any Unicode character is represented using 16-bits.<br />
b. 7-bits are needed to represent any ASCII character.<br />
c. UTF-8 characters are represented using only 8-bits.<br />
d. UTF-16 characters are represented using only 16-bits.<br />
Ans : a and b.<br />
1. Which of the following are true?<br />
a. The Serializable interface is used to identify objects that may be written to an output stream.<br />
b. The Externalizable interface is implemented by classes that control the way in which their objects are serialized.<br />
c. The Serializable interface extends the Externalizable interface.<br />
d. The Externalizable interface extends the Serializable interface.<br />
Ans : a, b and d.<br />
1. Which of the following are true about the File class?<br />
a. A File object can be used to change the current working directory.<br />
b. A File object can be used to access the files in the current directory.<br />
c. When a File object is created, a corresponding directory or file is created in the local file system.<br />
d. File objects are used to access files and directories on the local file system.<br />
e. File objects can be garbage collected.<br />
f. When a File object is garbage collected, the corresponding file or directory is deleted.<br />
Ans : b, d and e.<br />
1. How do you create a Reader object from an InputStream object?<br />
a. Use the static createReader( ) method of InputStream class.<br />
b. Use the static createReader( ) method of Reader class.<br />
c. Create an InputStreamReader object, passing the InputStream object as an argument to the InputStreamReader constructor.<br />
d. Create an OutputStreamReader object, passing the InputStream object as an argument to the OutputStreamReader constructor.<br />
Ans : c.<br />
1. Which of the following are true?<br />
a. Writer classes can be used to write characters to output streams using different character encodings.<br />
b. Writer classes can be used to write Unicode characters to output streams.<br />
c. Writer classes have methods that support the writing of the values of any Java primitive type to output streams.<br />
d. Writer classes have methods that support the writing of objects to output streams.<br />
Ans : a and b.<br />
1. The isFile( ) method returns a boolean value depending on whether the file object is a file or a directory.<br />
a. True.<br />
b. False.<br />
Ans : a.<br />
1. Reading or writing can be done even after closing the input/output source.<br />
a. True.<br />
b. False.<br />
Ans : b.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1. The ________ method helps in clearing the buffer.<br />
Ans : flush( ).<br />
2. The System.err method is used to print error message.<br />
a. True.<br />
b. False.<br />
Ans : a.<br />
1. What is meant by StreamTokenizer?<br />
Ans : StreamTokenizer breaks up InputStream into tokens that are delimited by sets of characters.<br />
It has the constructor : StreamTokenizer(Reader inStream).<br />
Here inStream must be some form of Reader.<br />
2. What is Serialization and deserialization?<br />
Ans : Serialization is the process of writing the state of an object to a byte stream.<br />
Deserialization is the process of restoring these objects.<br />
30) Which of the following can you perform using the File class?<br />
a) Change the current directory<br />
b) Return the name of the parent directory<br />
c) Delete a file<br />
d) Find if a file contains text or binary information<br />
Ans : b and c.<br />
31)How can you change the current working directory using an instance of the File class called FileName?<br />
a. FileName.chdir("DirName").<br />
b. FileName.cd("DirName").<br />
c. FileName.cwd("DirName").<br />
d. The File class does not support directly changing the current directory.<br />
Ans : d.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
APPLETS<br />
1. What is an Applet? Should applets have constructors?<br />
Ans : Applet is a dynamic and interactive program that runs inside a Web page<br />
displayed by a Java capable browser. We don’t have the concept of Constructors in Applets.<br />
2. How do we read number information from my applet’s parameters, given that Applet’s getParameter() method returns a string?<br />
Ans : Use the parseInt() method in the Integer Class, the Float(String) constructor in the<br />
Class Float, or the Double(String) constructor in the class Double.<br />
3. How can I arrange for different applets on a web page to communicate with each other?<br />
Ans : Name your applets inside the Applet tag and invoke AppletContext’s getApplet()<br />
method in your applet code to obtain references to the other applets on the page.<br />
4. How do I select a URL from my Applet and send the browser to that page?<br />
Ans : Ask the applet for its applet context and invoke showDocument() on that context object.<br />
Eg. URL targetURL;<br />
String URLString<br />
AppletContext context = getAppletContext();<br />
try{<br />
targetUR L = new URL(URLString);<br />
} catch (Malformed URLException e){<br />
// Code for recover from the exception<br />
}<br />
context. showDocument (targetURL);<br />
5. Can applets on different pages communicate with each other?<br />
Ans : No. Not Directly. The applets will exchange the information at one meeting place<br />
either on the local file system or at remote system.<br />
6. How do Applets differ from Applications?<br />
Ans : Appln: Stand Alone<br />
Applet: Needs no explicit installation on local m/c.<br />
Appln: Execution starts with main() method.<br />
Applet: Execution starts with init() method.<br />
Appln: May or may not be a GUI<br />
Applet: Must run within a GUI (Using AWT)<br />
7. How do I determine the width and height of my application?<br />
Ans : Use the getSize() method, which the Applet class inherits from the Component<br />
class in the Java.awt package. The getSize() method returns the size of the applet as<br />
a Dimension object, from which you extract separate width, height fields.<br />
Eg. Dimension dim = getSize ();<br />
int appletwidth = dim.width ();<br />
8) What is AppletStub Interface?<br />
Ans : The applet stub interface provides the means by which an applet and the browser communicate. Your code will not typically implement this interface.<br />
9. It is essential to have both the .java file and the .html file of an applet in the same<br />
directory.<br />
a. True.<br />
b. False.<br />
Ans : b.<br />
9. The tag contains two attributes namely _________ and _______.<br />
Ans : Name , value.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
10. Passing values to parameters is done in the _________ file of an applet.<br />
Ans : .html.<br />
12) What tags are mandatory when creating HTML to display an applet<br />
a. name, height, width<br />
b. code, name<br />
c. codebase, height, width<br />
d) code, height, width<br />
Ans : d.<br />
13. Applet’s getParameter( ) method can be used to get parameter values.<br />
a. True.<br />
b. False.<br />
Ans : a.<br />
13. What are the Applet’s Life Cycle methods? Explain them?<br />
Ans : init( ) method - Can be called when an applet is first loaded.<br />
start( ) method - Can be called each time an applet is started.<br />
paint( ) method - Can be called when the applet is minimized or refreshed.<br />
stop( ) method - Can be called when the browser moves off the applet’s page.<br />
destroy( ) method - Can be called when the browser is finished with the applet.<br />
14. What are the Applet’s information methods?<br />
Ans : getAppletInfo( ) method : Returns a string describing the applet, its author ,copy<br />
right information, etc.<br />
getParameterInfo( ) method : Returns an array of string describing the applet’s parameters.<br />
15. All Applets are subclasses of Applet.<br />
a. True.<br />
b. False.<br />
Ans : a.<br />
13. All Applets must import java.applet and java.awt.<br />
a. True.<br />
b. False.<br />
Ans : a.<br />
13. What are the steps involved in Applet development?<br />
Ans : a) Edit a Java source file,<br />
b) Compile your program and<br />
c) Execute the appletviewer, specifying the name of your applet’s source file.<br />
14. Applets are executed by the console based Java run-time interpreter.<br />
a. True.<br />
b. False.<br />
Ans : b.<br />
13. Which classes and interfaces does Applet class consist?<br />
Ans : Applet class consists of a single class, the Applet class and three interfaces: AppletContext,<br />
AppletStub and AudioClip.<br />
14. What is the sequence for calling the methods by AWT for applets?<br />
Ans : When an applet begins, the AWT calls the following methods, in this sequence.<br />
1. init( )<br />
2. start( )<br />
3. paint( )<br />
When an applet is terminated, the following sequence of method cals takes place :<br />
1. stop( )<br />
2. destroy( )<br />
13. Which method is used to output a string to an applet?<br />
Ans : drawString ( ) method.<br />
14. Every color is created from an RGB value.<br />
a. True.<br />
b. False<br />
Ans : a.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
EVENT HANDLING<br />
1. The event delegation model, introduced in release 1.1 of the JDK, is fully compatible with the<br />
1. event model.<br />
a. True<br />
b. False<br />
Ans : b.<br />
1. A component subclass that has executed enableEvents( ) to enable processing of a certain kind of event cannot also use an adapter as a listener for the same kind of event.<br />
a. True<br />
b. False<br />
Ans : b.<br />
1. What is the highest-level event class of the event-delegation model?<br />
Ans : The java.util.eventObject class is the highest-level class in the event-delegation hierarchy.<br />
2. What interface is extended by AWT event listeners?<br />
Ans : All AWT event listeners extend the java.util.EventListener interface.<br />
3. What class is the top of the AWT event hierarchy?<br />
Ans : The java.awt.AWTEvent class is the highest-level class in the AWT event class hierarchy.<br />
4. What event results from the clicking of a button?<br />
Ans : The ActionEvent event is generated as the result of the clicking of a button.<br />
5. What is the relationship between an event-listener interface and an event-adapter class?<br />
Ans : An event-listener interface defines the methods that must be implemented by an event<br />
handler for a particular kind of event.<br />
An event adapter provides a default implementation of an event-listener interface.<br />
6. In which package are most of the AWT events that support the event-delegation model defined?<br />
Ans : Most of the AWT–related events of the event-delegation model are defined in the<br />
java.awt.event package. The AWTEvent class is defined in the java.awt package.<br />
7. What is the advantage of the event-delegation model over the earlier event-inheritance model?<br />
Ans : The event-delegation has two advantages over the event-inheritance model. They are :<br />
1. It enables event handling by objects other than the ones that generate the events. This<br />
allows a clean separation between a component’s design and its use.<br />
2. It performs much better in applications where many events are generated. This<br />
performance improvement is due to the fact that the event-delegation model does not<br />
have to repeatedly process unhandled events, as is the case of the event-inheritance<br />
model.<br />
1. What is the purpose of the enableEvents( ) method?<br />
Ans :The enableEvents( ) method is used to enable an event for a particular object.<br />
2. Which of the following are true?<br />
a. The event-inheritance model has replaced the event-delegation model.<br />
b. The event-inheritance model is more efficient than the event-delegation model.<br />
c. The event-delegation model uses event listeners to define the methods of event-handling classes.<br />
d. The event-delegation model uses the handleEvent( ) method to support event handling.<br />
Ans : c.<br />
1. Which of the following is the highest class in the event-delegation model?<br />
a. java.util.EventListener<br />
b. java.util.EventObject<br />
c. java.awt.AWTEvent<br />
d. java.awt.event.AWTEvent<br />
Ans : b.<br />
1. When two or more objects are added as listeners for the same event, which listener is first invoked to handle the event?<br />
a. The first object that was added as listener.<br />
b. The last object that was added as listener.<br />
c. There is no way to determine which listener will be invoked first.<br />
d. It is impossible to have more than one listener for a given event.<br />
Ans : c.<br />
1. Which of the following components generate action events?<br />
a. Buttons<br />
b. Labels<br />
c. Check boxes<br />
d. Windows<br />
Ans : a.<br />
1. Which of the following are true?<br />
a. A TextField object may generate an ActionEvent.<br />
b. A TextArea object may generate an ActionEvent.<br />
c. A Button object may generate an ActionEvent.<br />
d. A MenuItem object may generate an ActionEvent.<br />
Ans : a,c and d.<br />
1. Which of the following are true?<br />
a. The MouseListener interface defines methods for handling mouse clicks.<br />
b. The MouseMotionListener interface defines methods for handling mouse clicks.<br />
c. The MouseClickListener interface defines methods for handling mouse clicks.<br />
d. The ActionListener interface defines methods for handling the clicking of a button.<br />
Ans : a and d.<br />
1. Suppose that you want to have an object eh handle the TextEvent of a TextArea object t. How should you add eh as the event handler for t?<br />
a. t.addTextListener(eh);<br />
b. eh.addTextListener(t);<br />
c. addTextListener(eh.t);<br />
d. addTextListener(t,eh);<br />
Ans : a.<br />
1. What is the preferred way to handle an object’s events in Java 2?<br />
a. Override the object’s handleEvent( ) method.<br />
b. Add one or more event listeners to handle the events.<br />
c. Have the object override its processEvent( ) methods.<br />
d. Have the object override its dispatchEvent( ) methods.<br />
Ans : b.<br />
1. Which of the following are true?<br />
a. A component may handle its own events by adding itself as an event listener.<br />
b. A component may handle its own events by overriding its event-dispatching method.<br />
c. A component may not handle oits own events.<br />
d. A component may handle its own events only if it implements the handleEvent( ) method.<br />
Ans : a and b.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1. How many types of events are provided by AWT? Explain them?<br />
Ans : The AWT provides two types of events. They are :<br />
1. Low-level event : A low-level event is the one that represents a low-level input or<br />
window-system occurrence on a visual component on the screen.<br />
2. Semantic event : Semantic event is defined at a higher-level to encapsulate the<br />
semantics of a user interface component’s model.<br />
1. A __________ is an object that originates or "fire" events.<br />
Ans : source.<br />
2. The event listener corresponding to handling keyboard events is the _________ .<br />
Ans : KeyListener.<br />
3. What are the types of mouse event listeners?<br />
Ans : MouseListener and MouseMotionListener.<br />
24) Which of the following are correct event handling methods<br />
a) mousePressed(MouseEvent e){}<br />
b) MousePressed(MouseClick e){}<br />
c) functionKey(KeyPress k){}<br />
d) componentAdded(ContainerEvent e){}<br />
Ans : a and d.<br />
25) Which of the following are true?<br />
a) A component may have only one event listener attached at a time<br />
b) An event listener may be removed from a component<br />
c) The ActionListener interface has no corresponding Adapter class<br />
d) The processing of an event listener requires a try/catch block<br />
Ans : b and c.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
AWT : WINDOWS, GRAPHICS AND FONTS<br />
1. How would you set the color of a graphics context called g to cyan?<br />
a. g.setColor(Color.cyan);<br />
b. g.setCurrentColor(cyan);<br />
c. g.setColor("Color.cyan");<br />
d. g.setColor("cyan’);<br />
e. g.setColor(new Color(cyan));<br />
Ans : a.<br />
1. The code below draws a line. What color is the line?<br />
g.setColor(Color.red.green.yellow.red.cyan);<br />
g.drawLine(0, 0, 100,100);<br />
a. Red<br />
b. Green<br />
c. Yellow<br />
d. Cyan<br />
e. Black<br />
Ans : d.<br />
1. What does the following code draw?<br />
g.setColor(Color.black);<br />
g.drawLine(10, 10, 10, 50);<br />
g.setColor(Color.RED);<br />
g.drawRect(100, 100, 150, 150);<br />
a. A red vertical line that is 40 pixels long and a red square with sides of 150 pixels<br />
b. A black vertical line that is 40 pixels long and a red square with sides of 150 pixels<br />
c. A black vertical line that is 50 pixels long and a red square with sides of 150 pixels<br />
d. A red vertical line that is 50 pixels long and a red square with sides of 150 pixels<br />
e. A black vertical line that is 40 pixels long and a red square with sides of 100 pixel<br />
Ans : b.<br />
1. Which of the statements below are true?<br />
a. A polyline is always filled.<br />
b) A polyline can not be filled.<br />
c) A polygon is always filled.<br />
d) A polygon is always closed<br />
e) A polygon may be filled or not filled<br />
Ans : b, d and e.<br />
1. What code would you use to construct a 24-point bold serif font?<br />
a. new Font(Font.SERIF, 24,Font.BOLD);<br />
b. new Font("SERIF", 24, BOLD");<br />
c. new Font("BOLD ", 24,Font.SERIF);<br />
d. new Font("SERIF", Font.BOLD,24);<br />
e. new Font(Font.SERIF, "BOLD", 24);<br />
Ans : d.<br />
1. What does the following paint( ) method draw?<br />
Public void paint(Graphics g) {<br />
g.drawString("question #6",10,0);<br />
}<br />
a. The string "question #6", with its top-left corner at 10,0<br />
b. A little squiggle coming down from the top of the component, a little way in from the left edge<br />
Ans : b.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1. What does the following paint( ) method draw?<br />
Public void paint(Graphics g) {<br />
g.drawString("question #6",10,0);<br />
}<br />
a. A circle at (100, 100) with radius of 44<br />
b. A circle at (100, 44) with radius of 100<br />
c. A circle at (100, 44) with radius of 44<br />
d. The code does not compile<br />
Ans : d.<br />
8)What is relationship between the Canvas class and the Graphics class?<br />
Ans : A Canvas object provides access to a Graphics object via its paint( ) method.<br />
1. What are the Component subclasses that support painting.<br />
Ans : The Canvas, Frame, Panel and Applet classes support painting.<br />
2. What is the difference between the paint( ) and repaint( ) method?<br />
Ans : The paint( ) method supports painting via a Graphics object. The repaint( ) method is used<br />
to cause paint( ) to be invoked by the AWT painting method.<br />
3. What is the difference between the Font and FontMetrics classes?<br />
Ans : The FontMetrics class is used to define implementation-specific properties, such as ascent<br />
and descent, of a Font object.<br />
4. Which of the following are passed as an argument to the paint( ) method?<br />
a. A Canvas object<br />
b. A Graphics object<br />
c. An Image object<br />
d. A paint object<br />
Ans : b.<br />
1. Which of the following methods are invoked by the AWT to support paint and repaint operations?<br />
a. paint( )<br />
b. repaint( )<br />
c. draw( )<br />
d. redraw( )<br />
Ans : a.<br />
1. Which of the following classes have a paint( ) method?<br />
a. Canvas<br />
b. Image<br />
c. Frame<br />
d. Graphics<br />
Ans : a and c.<br />
1. Which of the following are methods of the Graphics class?<br />
a. drawRect( )<br />
b. drawImage( )<br />
c. drawPoint( )<br />
d. drawString( )<br />
Ans : a, b and d.<br />
1. Which Font attributes are available through the FontMetrics class?<br />
a. ascent<br />
b. leading<br />
c. case<br />
d. height<br />
Ans : a, b and d.<br />
1. Which of the following are true?<br />
a. The AWT automatically causes a window to be repainted when a portion of a window has been minimized and then maximized.<br />
b. The AWT automatically causes a window to be repainted when a portion of a window has been covered and then uncovered.<br />
c. The AWT automatically causes a window to be repainted when application data is changed.<br />
d. The AWT does not support repainting operations.<br />
Ans : a and b.<br />
1. Which method is used to size a graphics object to fit the current size of the window?<br />
Ans : getSize( ) method.<br />
2. What are the methods to be used to set foreground and background colors?<br />
Ans : setForeground( ) and setBackground( ) methods.<br />
19) You have created a simple Frame and overridden the paint method as follows<br />
public void paint(Graphics g){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
g.drawString("Dolly",50,10);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
What will be the result when you attempt to compile and run the program?<br />
a. The string "Dolly" will be displayed at the centre of the frame<br />
b) An error at compilation complaining at the signature of the paint method<br />
c) The lower part of the word Dolly will be seen at the top of the form, with the top hidden.<br />
d) The string "Dolly" will be shown at the bottom of the form<br />
Ans : c.<br />
20) Where g is a graphics instance what will the following code draw on the screen.<br />
g.fillArc(45,90,50,50,90,180);<br />
a) An arc bounded by a box of height 45, width 90 with a centre point of 50,50, starting<br />
at an angle of 90 degrees traversing through 180 degrees counter clockwise.<br />
b) An arc bounded by a box of height 50, width 50, with a centre point of 45,90 starting<br />
at an angle of 90 degrees traversing through 180 degrees clockwise.<br />
c) An arc bounded by a box of height 50, width 50, with a top left at coordinates of 45,<br />
90, starting at 90 degrees and traversing through 180 degrees counter clockwise.<br />
d) An arc starting at 45 degrees, traversing through 90 degrees clockwise bounded by a<br />
box of height 50, width 50 with a centre point of 90, 180.<br />
Ans : c.<br />
21) Given the following code<br />
import java.awt.*;<br />
public class SetF extends Frame{<br />
public static void main(String argv[]){<br />
SetF s = new SetF();<br />
s.setSize(300,200);<br />
s.setVisible(true);<br />
}<br />
}<br />
How could you set the frame surface color to pink<br />
a)s.setBackground(Color.pink);<br />
b)s.setColor(PINK);<br />
c)s.Background(pink);<br />
d)s.color=Color.pink<br />
Ans : a.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
AWT: CONTROLS, LAYOUT MANAGERS AND MENUS<br />
1. What is meant by Controls and what are different types of controls?<br />
Ans : Controls are componenets that allow a user to interact with your application.<br />
The AWT supports the following types of controls:<br />
o Labels<br />
o Push buttons<br />
o Check boxes<br />
o Choice lists<br />
o Lists<br />
o Scroll bars<br />
o Text components<br />
These controls are subclasses of Component.<br />
1. You want to construct a text area that is 80 character-widths wide and 10 character-heights tall. What code do you use?<br />
a. new TextArea(80, 10)<br />
b. new TextArea(10, 80)<br />
Ans: b.<br />
1. A text field has a variable-width font. It is constructed by calling new<br />
TextField("iiiii"). What happens if you change the contents of the text field to<br />
"wwwww"? (Bear in mind that is one of the narrowest characters, and w is one of the widest.)<br />
a. The text field becomes wider.<br />
b. The text field becomes narrower.<br />
c. The text field stays the same width; to see the entire contents you will have to scroll by using the and keys.<br />
d. The text field stays the same width; to see the entire contents you will have to scroll by using the text field’s horizontal scroll bar.<br />
Ans : c.<br />
1. The CheckboxGroup class is a subclass of the Component class.<br />
a. True<br />
b. False<br />
Ans : b.<br />
5) What are the immediate super classes of the following classes?<br />
a. a) Container class<br />
b. b) MenuComponent class<br />
c. c) Dialog class<br />
d. d) Applet class<br />
e. e) Menu class<br />
Ans : a) Container - Component<br />
b) MenuComponent - Object<br />
c) Dialog - Window<br />
d) Applet - Panel<br />
e) Menu - MenuItem<br />
6) What are the SubClass of Textcomponent Class?<br />
Ans : TextField and TextArea<br />
7) Which method of the component class is used to set the position and the size of a component?<br />
Ans : setBounds()<br />
8) Which TextComponent method is used to set a TextComponent to the read-only state?<br />
Ans : setEditable()<br />
9) How can the Checkbox class be used to create a radio button?<br />
Ans : By associating Checkbox objects with a CheckboxGroup.<br />
10) What Checkbox method allows you to tell if a Checkbox is checked?<br />
Ans : getState()<br />
11) Which Component method is used to access a component's immediate Container?<br />
a. getVisible()<br />
b. getImmediate<br />
c. getParent()<br />
d. getContainer<br />
Ans : c.<br />
12) What methods are used to get and set the text label displayed by a Button object?<br />
Ans : getLabel( ) and setLabel( )<br />
13) What is the difference between a Choice and a List?<br />
Ans : A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices. Only one item may be selected from a Choice.<br />
A List may be displayed in such a way that several List items are visible. A List supports the selection of one or more List items.<br />
14) Which Container method is used to cause a container to be laid out and redisplayed?<br />
Ans : validate( )<br />
15) What is the difference between a Scollbar and a Scrollpane?<br />
Ans : A Scrollbar is a Component, but not a Container.<br />
A Scrollpane is a Container and handles its own events and performs its own<br />
scrolling.<br />
16) Which Component subclass is used for drawing and painting?<br />
Ans : Canvas.<br />
17) Which of the following are direct or indirect subclasses of Component?<br />
a. Button<br />
b. Label<br />
c. CheckboxMenuItem<br />
d. Toolbar<br />
e. Frame<br />
Ans : a, b and e.<br />
18) Which of the following are direct or indirect subclasses of Container?<br />
a. Frame<br />
b. TextArea<br />
c. MenuBar<br />
d. FileDialog<br />
e. Applet<br />
Ans : a,d and e.<br />
19) Which method is used to set the text of a Label object?<br />
a. setText( )<br />
b. setLabel( )<br />
c. setTextLabel( )<br />
d. setLabelText( )<br />
Ans : a.<br />
20) Which constructor creates a TextArea with 10 rows and 20 columns?<br />
a. new TextArea(10, 20)<br />
b. new TextArea(20, 10)<br />
c. new TextArea(new Rows(10), new columns(20))<br />
d. new TextArea(200)<br />
Ans : a.<br />
(Usage is TextArea(rows, columns)<br />
21) Which of the following creates a List with 5 visible items and multiple selection enabled?<br />
a. new List(5, true)<br />
b. new List(true, 5)<br />
c. new List(5, false)<br />
d. new List(false,5)<br />
Ans : a.<br />
[Usage is List(rows, multipleMode)]<br />
22) Which are true about the Container class?<br />
a. The validate( ) method is used to cause a Container to be laid out and redisplayed.<br />
b. The add( ) method is used to add a Component to a Container.<br />
c. The getBorder( ) method returns information about a Container’s insets.<br />
d. The getComponent( ) method is used to access a Component that is contained in a Container.<br />
Ans : a, b and d.<br />
23) Suppose a Panel is added to a Frame and a Button is added to the Panel. If the Frame’s font is set to 12-point TimesRoman, the Panel’s font is set to 10-point TimesRoman, and the Button’s font is not set, what font will be used to dispaly the Button’s label?<br />
a. 12-point TimesRoman<br />
b. 11-point TimesRoman<br />
c. 10-point TimesRoman<br />
d. 9-point TimesRoman<br />
Ans : c.<br />
1. A Frame’s background color is set to Color.Yellow, and a Button’s background color is to Color.Blue. Suppose the Button is added to a Panel, which is added to the Frame. What background color will be used with the Panel?<br />
a. Colr.Yellow<br />
b. Color.Blue<br />
c. Color.Green<br />
d. Color.White<br />
e. Ans : a.<br />
25) Which method will cause a Frame to be displayed?<br />
a. show( )<br />
b. setVisible( )<br />
c. display( )<br />
d. displayFrame( )<br />
Ans : a and b.<br />
26) All the componenet classes and container classes are derived from _________ class.<br />
Ans : Object.<br />
27) Which method of the container class can be used to add components to a Panel.<br />
Ans : add ( ) method.<br />
28) What are the subclasses of the Container class?<br />
Ans : The Container class has three major subclasses. They are :<br />
a. Window<br />
b. Panel<br />
c. ScrollPane<br />
29) The Choice component allows multiple selection.<br />
a. True.<br />
b. False.<br />
Ans : b.<br />
30) The List component does not generate any events.<br />
a. True.<br />
b. False.<br />
Ans : b.<br />
31) Which components are used to get text input from the user.<br />
Ans : TextField and TextArea.<br />
32) Which object is needed to group Checkboxes to make them exclusive?<br />
Ans : CheckboxGroup.<br />
33) Which of the following components allow multiple selections?<br />
a. Non-exclusive Checkboxes.<br />
b. Radio buttons.<br />
c. Choice.<br />
d. List.<br />
Ans : a and d.<br />
34) What are the types of Checkboxes and what is the difference between them?<br />
Ans : Java supports two types of Checkboxes. They are : Exclusive and Non-exclusive.<br />
In case of exclusive Checkboxes, only one among a group of items can be selected at a time. I f an item from the group is selected, the checkbox currently checked is deselected and the new selection is highlighted. The exclusive Checkboxes are also called as Radio buttons.<br />
The non-exclusive checkboxes are not grouped together and each one can be selected independent of the other.<br />
35) What is a Layout Manager and what are the different Layout Managers available in java.awt and what is the default Layout manager for the panal and the panal subclasses?<br />
Ans: A layout Manager is an object that is used to organize components in a container.<br />
The different layouts available in java.awt are :<br />
FlowLayout, BorderLayout, CardLayout, GridLayout and GridBag Layout.<br />
The default Layout Manager of Panal and Panal sub classes is FlowLayout".<br />
36) Can I exert control over the size and placement of components in my interface?<br />
Ans : Yes.<br />
myPanal.setLayout(null);<br />
myPanal.setbounds(20,20,200,200);<br />
37) Can I add the same component to more than one container?<br />
Ans : No. Adding a component to a container automatically removes it from any previous parent(container).<br />
38) How do I specify where a window is to be placed?<br />
Ans : Use setBounds, setSize, or setLocation methods to implement this.<br />
setBounds(int x, int y, int width, int height)<br />
setBounds(Rectangle r)<br />
setSize(int width, int height)<br />
setSize(Dimension d)<br />
setLocation(int x, int y)<br />
setLocation(Point p)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
39) How can we create a borderless window?<br />
Ans : Create an instance of the Window class, give it a size, and show it on the screen.<br />
eg. Frame aFrame = ......<br />
Window aWindow = new Window(aFrame);<br />
aWindow.setLayout(new FlowLayout());<br />
aWindow.add(new Button("Press Me"));<br />
aWindow.getBounds(50,50,200,200);<br />
aWindow.show();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
40) Can I create a non-resizable windows? If so, how?<br />
Ans: Yes. By using setResizable() method in class Frame.<br />
41) What is the default Layout Manager for the Window and Window subclasses (Frame,Dialog)?<br />
Ans : BorderLayout().<br />
42) How are the elements of different layouts organized?<br />
Ans : FlowLayout : The elements of a FlowLayout are organized in a top to bottom, left to right fashion.<br />
BorderLayout : The elements of a BorderLayout are organized at the<br />
borders (North, South, East and West) and the center of a<br />
container.<br />
CardLayout : The elements of a CardLayout are stacked, one on top of the other, like a deck of cards.<br />
GridLayout : The elements of a GridLayout are of equal size and are laid out using the square of a grid.<br />
GridBagLayout : The elements of a GridBagLayout are organized according to a grid.However, the elements are of different sizes and may occupy<br />
more than one row or column of the grid. In addition, the rows and columns may have different sizes.<br />
43) Which containers use a BorderLayout as their default layout?<br />
Ans : The Window, Frame and Dialog classes use a BorderLayout as their default layout.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
44) Which containers use a FlowLayout as their default layout?<br />
Ans : The Panel and the Applet classes use the FlowLayout as their default layout.<br />
45) What is the preferred size of a component?<br />
Ans : The preferred size of a component size that will allow the component to display normally.<br />
46) Which method is method to set the layout of a container?<br />
a. startLayout( )<br />
b. initLayout( )<br />
c. layoutContainer( )<br />
d. setLayout( )<br />
Ans : d.<br />
47) Which method returns the preferred size of a component?<br />
a. getPreferredSize( )<br />
b. getPreferred( )<br />
c. getRequiredSize( )<br />
d. getLayout( )<br />
Ans : a.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
48) Which layout should you use to organize the components of a container in a<br />
tabular form?<br />
a. CardLayout<br />
b. BorederLayout<br />
c. FlowLayout<br />
d. GridLayout<br />
Ans : d.<br />
49. An application has a frame that uses a Border layout manager. Why is it probably not a good idea to put a vertical scroll bar at North in the frame?<br />
a. The scroll bar’s height would be its preferred height, which is not likely to be enough.<br />
b. The scroll bar’s width would be the entire width of the frame, which would be much wider than necessary.<br />
c. Both a and b.<br />
d. Neither a nor b. There is no problem with the layout as described.<br />
Ans : c.<br />
49. What is the default layouts for a applet, a frame and a panel?<br />
Ans : For an applet and a panel, Flow layout is the default layout, whereas Border layout is default layout for a frame.<br />
50. If a frame uses a Grid layout manager and does not contain any panels, then all the components within the frame are the same width and height.<br />
a. True<br />
b. False.<br />
Ans : a.<br />
49. If a frame uses its default layout manager and does not contain any panels, then all the components within the frame are the same width and height.<br />
a. True<br />
b. False.<br />
Ans : b.<br />
49. With a Border layout manager, the component at Center gets all the space that is left over, after the components at North and South have been considered.<br />
a. True<br />
b. False<br />
Ans : b.<br />
49. An Applet has its Layout Manager set to the default of FlowLayout. What code would be the correct to change to another Layout Manager?<br />
a. setLayoutManager(new GridLayout());<br />
b. setLayout(new GridLayout(2,2));<br />
c) setGridLayout(2,2,))<br />
d setBorderLayout();<br />
Ans : b.<br />
55) How do you indicate where a component will be positioned using Flowlayout?<br />
a) North, South,East,West<br />
b) Assign a row/column grid reference<br />
c) Pass a X/Y percentage parameter to the add method<br />
d) Do nothing, the FlowLayout will position the component<br />
Ans :d.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
56) How do you change the current layout manager for a container?<br />
a) Use the setLayout method<br />
b) Once created you cannot change the current layout manager of a component<br />
c) Use the setLayoutManager method<br />
d) Use the updateLayout method<br />
Ans :a.<br />
57)When using the GridBagLayout manager, each new component requires a new instance of the GridBagConstraints class. Is this statement true or false?<br />
a) true<br />
b) false<br />
Ans : b.<br />
58) Which of the following statements are true?<br />
a)The default layout manager for an Applet is FlowLayout<br />
b) The default layout manager for an application is FlowLayout<br />
c) A layout manager must be assigned to an Applet before the setSize method is called<br />
d) The FlowLayout manager attempts to honor the preferred size of any components<br />
Ans : a and d.<br />
59) Which method does display the messages whenever there is an item selection or deselection of the CheckboxMenuItem menu?<br />
Ans : itemStateChanged method.<br />
60) Which is a dual state menu item?<br />
Ans : CheckboxMenuItem.<br />
61) Which method can be used to enable/diable a checkbox menu item?<br />
Ans : setState(boolean).<br />
62. Which of the following may a menu contain?<br />
a. A separator<br />
b. A check box<br />
c. A menu<br />
d. A button<br />
e. A panel<br />
Ans : a and c.<br />
62. Which of the following may contain a menu bar?<br />
a. A panel<br />
b. A frame<br />
c. An applet<br />
d. A menu bar<br />
e. A menu<br />
Ans : b<br />
64) What is the difference between a MenuItem and a CheckboxMenuItem?<br />
Ans : The CheckboxMenuItem class extends the MenuItem class to support a menu item<br />
that may be checked or unchecked.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
65) Which of the following are true?<br />
a. A Dialog can have a MenuBar.<br />
b. MenuItem extends Menu.<br />
c. A MenuItem can be added to a Menu.<br />
d. A Menu can be added to a Menu.<br />
Ans : c and d.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Java Certification - Questions and Answers<br />
Sun Certified Programmer Practice Exam<br />
Here are the rules:<br />
Allow 2 hours and 15 minutes to complete this exam. You should turn off the telephone, go someplace you won’t be disturbed, check the time on your watch, and begin. Don’t bring any books with you, because you won’t have them during the test. You can take breaks, but don’t look anything up. You can have a piece of scratch paper and a pen or pencil, but you can’t have any crib sheets!<br />
If you get 49 questions right, you’ve hit the 70% mark, and you’ve passed. Good luck!<br />
Questions<br />
Question 1: Which of the following class definitions defines a legal abstract class?<br />
Select all right answers.<br />
a)<br />
class Animal {<br />
abstract void growl();<br />
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
b)<br />
abstract Animal {<br />
abstract void growl();<br />
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
c)<br />
class abstract Animal {<br />
abstract void growl();<br />
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
d)<br />
abstract class Animal {<br />
abstract void growl();<br />
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
e)<br />
abstract class Animal {<br />
abstract void growl() {<br />
System.out.println("growl");<br />
}<br />
}<br />
Question 2: For an object to be a target for a Thread, that object must be of type:<br />
Fill in the blank.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 3: What is the proper way of defining a class named Key so that it cannot be subclassed?<br />
a)<br />
class Key { }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
b)<br />
abstract final class Key { }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
c)<br />
native class Key { }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
d)<br />
class Key {<br />
final;<br />
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
e)<br />
final class Key { }<br />
Question 4: What modes are legal for creating a new RandomAccessFile object?<br />
Select all valid answers.<br />
a. "w"<br />
b. "r"<br />
c. "x"<br />
d. "rw"<br />
e. "xrw"</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 5: Given the following code:<br />
class Tester {<br />
public static void main(String[] args) {<br />
CellPhone cell = new CellPhone();<br />
cell.emergency();<br />
}<br />
}<br />
class Phone {<br />
final void dial911() {<br />
// code to dial 911 here . . ..<br />
}<br />
}<br />
class CellPhone extends Phone {<br />
void emegency() {<br />
dial911();<br />
}<br />
}<br />
What will happen when you try to compile and run the Tester class?<br />
a. The code will not compile because Phone is not also declared as final.<br />
b. The code will not compile because you cannot invoke a final method from a subclass.<br />
c. The code will compile and run fine.<br />
d. The code will compile but will throw a NoSuchMethodException when Tester is run.<br />
e. Phone and CellPhone are fine, but Tester will not compile because it cannot create an instance of a class that derives from a class defining a final method.<br />
Question 6: Which assignments are legal?<br />
Select all valid answers.<br />
a. long test = 012;<br />
b. float f = -412;<br />
c. int other = (int)true;<br />
d. double d = 0x12345678;<br />
e. short s = 10;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 7: Given this class definitions:<br />
abstract class Transaction implements Runnable { }<br />
class Deposit extends Transaction {<br />
protected void process() {<br />
addAmount();<br />
}<br />
void undo(int i) {<br />
System.out.println("Undo");<br />
}<br />
}<br />
What will happen if we attempted to compile the code?<br />
Select the one right answer.<br />
a. This code will not compile because the parameter i is not used in undo().<br />
b. This code will not compile because there is no main() method.<br />
c. This code will not compile because Deposit must be an abstract class.<br />
d. This code will not compile because Deposit is not declared public.<br />
e. Everything will compile fine.<br />
Question 8: Which exception might wait() throw?<br />
Fill in the blank.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 9: Which of the following are not Java keywords:<br />
abstract double int static<br />
boolean else interface super<br />
break extends long superclass<br />
byte final native switch<br />
case finally new synchronized<br />
catch float null this<br />
char for open throw<br />
class goto package throws<br />
close if private transient<br />
const implements protected try<br />
continue import public void<br />
default instanceof return volatile<br />
do integer short while</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Select all valid answers.<br />
a. superclass<br />
b. goto<br />
c. open<br />
d. close<br />
e. integer<br />
f. goto, import<br />
g. goto, superclass, open, close<br />
h. they are all valid keywords<br />
Question 10: Which of the following represents an octal number?<br />
Select all that apply.<br />
a. 0x12<br />
b. 32O<br />
c. 032<br />
d. (octal)2<br />
e. 1</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 11: What will appear in the standard output when you run the Tester class?<br />
class Tester {<br />
int var;<br />
Tester(double var) {<br />
this.var = (int)var;<br />
}<br />
Tester(int var) {<br />
this("hello");<br />
}<br />
Tester(String s) {<br />
this();<br />
System.out.println(s);<br />
}<br />
Tester() {<br />
System.out.println("good-bye");<br />
}<br />
public static void main(String[] args) {<br />
Tester t = new Tester(5);<br />
}<br />
}<br />
a. nothing<br />
b. "hello"<br />
c. 5<br />
d. "hello" followed by "good-bye"<br />
e. "good-bye" followed by "hello"<br />
Question 12: Write a line of code to use the String’s substring() method to obtain the substring "lip" from a String instance named s that is set to "tulip".<br />
Fill in the blank.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 13: There are a number of labels in the source code below. These are labeled a through j. Which label identifies the earliest point where, after that line has executed, the object referred to by the variable first may be garbage collected?<br />
class Riddle {<br />
public static void main(String[] args) {<br />
String first, second;<br />
String riddle;<br />
if (args.length 0)<br />
if (args[index].equals("Hiway"))<br />
milesPerGallon*= 2; System.out.println("mpg: " + milesPerGallon);<br />
}<br />
}<br />
Select the one right answer.<br />
a. The code compiles and displays "mpg: 50" if the command-line argument is "Hiway". If the command-line argument is not "Hiway", the code displays "mpg: 25".<br />
b. The code compiles and displays "mpg: 50" if the command-line argument is "Hiway". If the command-line argument is not "Hiway", the code throws an ArrayIndexOutOfBoundsException.<br />
c. The code does not compile because the automatic variable named index has not been initialized.<br />
d. The code does not compile because milesPerGallon has not been initialized.<br />
e. The code does not compile because the no-args constructor is not written correctly.<br />
Question 16: What will happen when you compile and run this program:<br />
class Array {<br />
public static void main(String[] args) {<br />
int length = 100;<br />
int[] d = new int[length];<br />
for (int index = 0; index < length; index++)<br />
System.out.println(d[index]); }<br />
}<br />
Select the one right answer.<br />
a. The code will not compile because the int[] array is not declared correctly.<br />
b. The code will compile but will throw an IndexArrayOutOfBoundsException when it runs and nothing will appear in the standard output.<br />
c. The code will display the numbers 0 through 99 in the standard output, and then throw an IndexOutOfBoundsException.<br />
d. The code will compile but the println() method will throw a NoSuchMethodException.<br />
e. This code will work fine and display 100 zeroes in the standard output.<br />
Question 17: What is the result of attempting to compile and run the following class?<br />
class Ar {<br />
public static void main(String[] args) {<br />
int[] seeds = new int[3];<br />
for (int i = 0; i < seeds.length; i++)<br />
System.out.println(i); }<br />
}<br />
Select all valid answers.<br />
a. 0<br />
b. 1<br />
c. 2<br />
d. 3<br />
e. the program does not compile because the seeds array is not initialized<br />
Question 18: What method name can you use from the applet to read a String passed to an applet via the tag? (Supply the method name only, without parameters.)<br />
Fill in the blank.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 19: Given these class definitions:<br />
class Superclass { }<br />
class Subclass1 extends Superclass { }<br />
and these objects:<br />
Superclass a = new Superclass();<br />
Subclass1 b = new Subclass1();<br />
which of the following explains the result of the statement:<br />
a = b;<br />
Select the one right answer.<br />
a. Illegal at compile time<br />
b. Legal at compile time but possibly illegal at runtime<br />
c. Definitely legal at runtime</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 20: Given these class definitions:<br />
class Superclass { }<br />
class Subclass1 extends Superclass { }<br />
class Subclass2 extends Superclass { }<br />
and these objects:<br />
Superclass a = new Superclass();<br />
Subclass1 b = new Subclass1();<br />
Subclass2 c = new Subclass2();<br />
which of the following explains the result of the statement:<br />
b = (Subclass1)c;<br />
Select the one right answer.<br />
a. Illegal at compile time<br />
b. Legal at compile time but possibly illegal at runtime<br />
c. Definitely legal at runtime</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 21: How you can use the escape notation \u to set the variable c, declared as a char, to the Unicode character whose value is hex 0x30A0?<br />
Fill in the blank.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 22: Which operators are overloaded for String objects?<br />
Question 20: Given these class definitions:<br />
class Superclass { }<br />
class Subclass1 extends Superclass { }<br />
class Subclass2 extends Superclass { }<br />
and these objects:<br />
Superclass a = new Superclass();<br />
Subclass1 b = new Subclass1();<br />
Subclass2 c = new Subclass2();<br />
which of the following explains the result of the statement:<br />
b = (Subclass1)c;<br />
Select the one right answer.<br />
a. Illegal at compile time<br />
b. Legal at compile time but possibly illegal at runtime<br />
c. Definitely legal at runtime<br />
Question 21: How you can use the escape notation \u to set the variable c, declared as a char, to the Unicode character whose value is hex 0x30A0?<br />
Fill in the blank.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 22: Which operators are overloaded for String objects?<br />
Select all valid answers.<br />
a. -<br />
b. +=<br />
c. >><br />
d. &<br />
• none of these<br />
Question 23: How can you change the break statement below so that it breaks out of both the inner and middle loops and continues with the next iteration of the outer loop?<br />
outer: for (int x = 0; x < 3; x++) {<br />
middle: for (int y = 0; y < 3; y++) {<br />
inner: for (int z = 0; z 3)<br />
d. float myFloat = 40.0;<br />
e. boolean b = (boolean)99;<br />
Question 40: Which label name(s) are illegal?<br />
Select all valid answers.<br />
a. here:<br />
b. _there:<br />
c. this:<br />
d. that:<br />
e. 2to1odds:<br />
Question 41: Given this code:<br />
import java.io.*;<br />
class Write {<br />
public static void main(String[] args) throws Exception {<br />
File file = new File("temp.test");<br />
FileOutputStream stream = new FileOutputStream(file);<br />
// write integers here. . .</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
}<br />
How can you replace the comment at the end of main() with code that will write the integers 0 through 9?<br />
Select the one right answer.<br />
a)<br />
DataOutputStream filter = new DataOutputStream(stream);<br />
for (int i = 0; i < 10; i++)<br />
filter.writeInt(i);<br />
b)<br />
for (int i = 0; i < 10; i++)<br />
file.writeInt(i);<br />
c)<br />
for (int i = 0; i < 10; i++)<br />
stream.writeInt(i);<br />
d)<br />
DataOutputStream filter = new DataOutputStream(stream);<br />
for (int i = 0; i < 10; i++)<br />
filter.write(i);<br />
e)<br />
for (int i = 0; i < 10; i++)<br />
stream.write(i);<br />
Question 42: What keyword, when used in front of a method, must also appear in front of the class?<br />
Fill in the blank.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 43: What letters get written to the standard output with the following code?<br />
class Unchecked {<br />
public static void main(String[] args) {<br />
try {<br />
method();<br />
} catch (Exception e) {<br />
}<br />
}<br />
static void method() {<br />
try {<br />
wrench();<br />
System.out.println("a");<br />
} catch (ArithmeticException e) {<br />
System.out.println("b");<br />
} finally {<br />
System.out.println("c");<br />
}<br />
System.out.println("d");<br />
}<br />
static void wrench() {<br />
throw new NullPointerException();<br />
}<br />
}<br />
Select all valid answers.<br />
a. "a"<br />
b. "b"<br />
c. "c"<br />
d. "d"<br />
e. none of these</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 44: What happens if the file "Ran.test" does not yet exist and you attempt to compile and run the following code?<br />
import java.io.*;<br />
class Ran {<br />
public static void main(String[] args) throws IOException {<br />
RandomAccessFile out = new RandomAccessFile("Ran.test", "rw");<br />
out.writeBytes("Ninotchka");<br />
}<br />
}<br />
Select the one right answer.<br />
a. The code does not compile because RandomAccessFile is not created correctly.<br />
b. The code does not compile because RandomAccessFile does not implement the writeBytes() method.<br />
c. The code compiles and runs but throws an IOException because "Ran.test" does not yet exist.<br />
d. The code compiles and runs but nothing appears in the file "Ran.test" that it creates.<br />
e. The code compiles and runs and "Ninotchka" appears in the file "Ran.test" that it creates.<br />
Question 45: If you run the following code on a on a PC from the directory c:\source:<br />
import java.io.*;<br />
class Path {<br />
public static void main(String[] args) throws Exception {<br />
File file = new File("Ran.test");<br />
System.out.println(file.getAbsolutePath());<br />
}<br />
}<br />
what do you expect the output to be?<br />
Select the one right answer.<br />
a. Ran.test<br />
b. source\Ran.test<br />
c. c:\source\Ran.test<br />
d. c:\source<br />
e. null<br />
Question 46: If you supply a target object when you create a new Thread, as in:<br />
Thread t = new Thread(targetObject);<br />
What test of instanceof does targetObject have to pass for this to be legal?<br />
Select the one right answer.<br />
a. targetObject instanceof Thread<br />
b. targetObject instanceof Object<br />
c. targetObject instanceof Applet<br />
d. targetObject instanceof Runnable<br />
e. targetObject instanceof String<br />
Question 47: What appears in the standard output when you run the Dots class?<br />
class Dots implements Runnable {<br />
DotThread t;<br />
public static void main(String[] args) {<br />
Dots d = new Dots();<br />
d.t = new DotThread();<br />
}<br />
public void init() {<br />
t.start();<br />
t = new DashThread().start();<br />
}<br />
}<br />
class DotThread extends Thread {<br />
public void run() {<br />
for (int index = 0; index < 100; index++)<br />
System.out.print(".");<br />
}<br />
}<br />
class DashThread extends Thread {<br />
public void run() {<br />
for (int index = 0; index < 100; index++)<br />
System.out.print("-");<br />
}<br />
}<br />
a. nothing<br />
b. 100 dots (.)<br />
c. 200 dots (.)<br />
d. 100 dashes (-)<br />
e. 100 dots (.) and 100 dashes(-)<br />
Question 48: When you invoke repaint() for a Component, the AWT package calls which Component method?<br />
a. repaint()<br />
b. update()<br />
c. paint()<br />
d. draw()<br />
e. show()<br />
Question 49: How you can you test whether an object referenced by ref implements an interface named MyInterface? Replace your test here with this test:<br />
if (your test here) {<br />
System.out.println("ref implements MyInterface");<br />
Fill in the blank.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 50: What does the following line of code do?<br />
TextField tf = new TextField(30);<br />
Select the one right answer.<br />
a. This code is illegal; there is no such constructor for TextField.<br />
b. Creates a TextField object that can hold 30 rows, but since it is not initialized to anything, it will always be empty.<br />
c. Creates a TextField object that can hold 30 columns, but since it is not initialized to anything, it will always be empty.<br />
d. This code creates a TextField object that can hold 30 rows of text.<br />
e. Creates a new TextField object that is 30 columns of text.<br />
Question 51: Given these code snippets:<br />
Boolean b1 = new Boolean(true);<br />
Boolean b2 = new Boolean(true);<br />
Which expressions are legal Java expressions that return true?<br />
Select all valid answers.<br />
a. b1 == b2<br />
b. b1.equals(b2)<br />
c. b1 & b2<br />
d. b1 | b2<br />
e. b1 && b2<br />
f. b1 || b2<br />
Question 52: Which LayoutManager arranges components left to right, then top to bottom, centering each row as it moves to the next?<br />
Select the one right answer.<br />
a. BorderLayout<br />
b. FlowLayout<br />
c. GridLayout<br />
d. CardLayout<br />
e. GridBagLayout<br />
Question 53: A component can be resized horizontally, but not vertically, when it is placed in which region of a BorderLayout?<br />
Select the one right answer.<br />
a. North or South<br />
b. East or West<br />
c. Center<br />
d. North, South, or Center<br />
e. any region<br />
Question 54: How can you place three Components along the bottom of a Container?<br />
Select the one right answer.<br />
a. Set the Container's LayoutManager to be a BorderLayout and add each Component to the "South" of the Container .<br />
b. Set the Container's LayoutManager to be a FlowLayout and add each Component to the Container.<br />
c. Set the Container's LayoutManager to be a BorderLayout; add each Component to a different Container that uses a FlowLayout, and then add that Container to the "South" of the first Container.<br />
d. Use a GridLayout for the Container and add each Component to the Container.<br />
e. Do not use a LayoutManager at all and add each Component to the Container.<br />
Question 55: What will happen when you attempt to compile and run the following program by passing the Test class to the Java interpreter?<br />
class Test {<br />
public static void main() {<br />
System.out.println("hello");<br />
}<br />
}<br />
Select the one right answer.<br />
a. The program does not compile because main() is not defined correctly.<br />
b. The program compiles but when you try to run the interpreter complains that it cannot find the main() method it needs to run.<br />
c. The program compiles but you cannot run it because the class is not declared as public.<br />
d. The program compiles and runs without an error but does not display anything in the standard output.<br />
e. The program compiles and displays "hello" in the standard output when you run it.<br />
Question 56: Which of the following is a valid way to embed an applet class named Q56 into a Web page?<br />
Select all right answers.<br />
a)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
b)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
c)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
d)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
e)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 57: How would you make the background color red for a Panel referenced by the variable p?<br />
Fill in the blank.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 58: How can you retrieve a circle’s radius value that’s passed to an applet?<br />
a)<br />
public void init() {<br />
String s = getParameter("radius");<br />
doSomethingWithRadius(s);<br />
}<br />
b)<br />
public static void main(String[] args) {<br />
String s = args[0];<br />
DoSomethingWithRadius(s);<br />
}<br />
c)<br />
public static void main(String[] args) {<br />
String s = getParameter("radius");<br />
DoSomethingWithRadius(s);<br />
}<br />
d)<br />
public void init() {<br />
int radius = getParameter("radius");<br />
doSomethingWithRadius(radius);<br />
}<br />
e)<br />
public void init() {<br />
int radius = getParameter();<br />
doSomethingWithRadius(radius);<br />
}<br />
Question 59: What is the result of invoking main() for the classes D and E?<br />
class D {<br />
public static void main(String[] args) {<br />
String s1 = new String("hello");<br />
String s2 = new String("hello");<br />
if (s1.equals(s2))<br />
System.out.println("equal");<br />
else<br />
System.out.println("not equal");<br />
}<br />
}<br />
class E {<br />
public static void main(String[] args) {<br />
StringBuffer sb1 = new StringBuffer("hello");<br />
StringBuffer sb2 = new StringBuffer("hello");<br />
if (sb1.equals(sb2))<br />
System.out.println("equal");<br />
else<br />
System.out.println("not equal");<br />
}<br />
}<br />
Select the one right answer.<br />
a. D: equal; E: equal<br />
b. D: not equal; E: not equal<br />
c. D: equal; E: not equal<br />
d. D: not equal; E: not equal<br />
e. nothing appears in the standard output for either class<br />
Question 60: What does the following code do?<br />
drawArc(50, 40, 20, 20, 90, 180);<br />
Select the one right answer.<br />
a. Draw an arc that is centered at x = 50, y = 40, is 20 pixels wide, as a semicircle from the top of the circle to the bottom along the left-hand side.<br />
b. Draw an arc that is centered at x = 50, y = 40, is 20 pixels wide, as a semicircle from the 3:00 position to the 9:00 position along the bottom of the circle.<br />
c. Draw an arc that is centered at x = 50, y = 40, is 20 pixels wide, as a semicircle from the top of the circle to the bottom along the right-hand side.<br />
d. Draw an arc in a circle whose left side is at 50, whose top is at 40, is 20 pixels wide, as a semicircle from the top of the circle to the bottom along the left-hand side.<br />
e. Draw an arc in a circle whose left side is at 50, whose top is at 40, is 20 pixels wide, as a semicircle from the top of the circle to the bottom along the right-hand side.<br />
Question 61: What does the following code do (if anything)?<br />
drawLine(0, 10, 20, 30);<br />
Select the one right answer.<br />
a. draw a line from x = 0, y = 20 to x = 10, y = 30<br />
b. draw a line from x = 0, y = 10 to the coordinates x = 20, y = 30<br />
c. draw the outline of a box whose left, top corner is at 0, 10 and that is 20 pixels wide and 30 pixels high<br />
d. nothing—this code does not compile because it does not provide the correct number of arguments<br />
e. nothing—this code does not compile because the arguments make no sense<br />
Question 62: What Graphics methods will draw the outline of a square?<br />
Select all right answers.<br />
a. drawRect()<br />
b. fillRect()<br />
c. drawPolygon()<br />
d. fillPolygon()<br />
Question 63: What method from Java 1.0.2 can you use to remove a Component from a user interface display?<br />
Select all right answers.<br />
a. disable()<br />
b. hide()<br />
c. remove()<br />
d. delete()<br />
e. unhook()<br />
Question 64: Returning a value of false in Java 1.0.2 from an event handler:<br />
Select the one right answer.<br />
a. passes that event is passed up the container hierarchy<br />
b. stops that event from being passed up the container hierarchy<br />
c. has no effect on whether the event is passed up the container heirarchy<br />
Question 65: Which statements about garbage collection are true?<br />
Select all valid answers.<br />
a. You can directly free the memory allocated by an object.<br />
b. You can directly run the garbage collector whenever you want to.<br />
c. The garbage collector informs your object when it is about to be garbage collected.<br />
d. The garbage collector reclaims an object’s memory as soon as it becomes a candidate for garbage collection.<br />
e. The garbage collector runs in low-memory situations.<br />
Question 66: If you’d like to change the size of a Component, you can use the Java 1.1-specific method:<br />
Select the one right answer.<br />
a. size()<br />
b. resize()<br />
c. area()<br />
d. setSize()<br />
e. dimension()<br />
Question 67: The setForeground() and setBackground() methods are defined in class:<br />
Select the one right answer.<br />
a. Graphics<br />
b. Container<br />
c. Component<br />
d. Object<br />
e. Applet<br />
Question 68: How many bits are used to maintain a char data type?<br />
Fill in the blank.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 69: The && operator works with which data types?<br />
Select all valid answers.<br />
a. int<br />
b. long<br />
c. double<br />
d. boolean<br />
e. float<br />
Question 70: To place a 1 in the high-bit of an int named ref that’s set to 0x00000001, you can write:<br />
Select the one right answer.<br />
a. ref >> 31;<br />
b. ref >>= 31;<br />
c. ref << 31;<br />
d. ref <<= 31;<br />
e. Shifts the bits in an integer to the left by the number of bits specified and fills the right-most bit with 1.<br />
f. Shifts the bits in an integer to the left by the number of bits specified and fills the right-most bit with 0.<br />
Answers and explanations<br />
Question 1: d. An abstract class is defined using the keyword abstract in front of the class keyword and almost always defines at least one abstract method. An abstract class does not have to define an abstract method. If there are no abstract methods in an abstract class, then any subclasses of the abstract class can be instantiated (as long as they are not, in turn, defined using the abstract keyword). (See chapter 1.)<br />
Question 2: "Runnable". Only classes that implement the Runnable interface (and so are of type Runnable) can be targets of threads.<br />
Question 3: e. Use the final keyword in front of the class to make the class unable to be subclassed. (See chapter 1.)<br />
Question 4: b, d. Only "r" and "rw" are legal modes for a RandomAccessFile.<br />
Question 5: c. This code is perfectly fine. (See chapter 1.)<br />
Question 6: a, b, d, and e. The other tries to cast a boolean to an int, which is illegal.<br />
Quesiton 7: c. Since the superclass is abstract and implements Runnable, but does not supply a run() method, the subclass must supply run() or also be declared abstract. (See chapter 1.)<br />
Question 8: "InterruptedException" or "IllegalMonitorException".<br />
Question 9: a, c, d, e. superclass, open, close, and integer are not Java keywords. goto is a keyword, though it isn’t used as of Java 1.1. (See chapter 2.)<br />
Question 10: c. An octal number in Java is preceded by a 0.<br />
Question 11: e. Oh, the tangled web we weave… There are three constructors that come into play. First, the constructor that thakes an int is invoked. This invokes the constructor that takes a String. This invokes the no-args constructor, which displays "good-bye." Then, the constructor that takes a String displays "hello." (See chapter 3.)<br />
Question 12: "s.substring(2, 5)" or "s.substring(2)" or "s.substring(2, s.length())";<br />
Question 13: a. A new String is created based on args[0], but args[0] does not have to be nulled out before first can be garbage collected. As soon as the line with the label d is executed, the object that first has referred to is ready to be garbage collected, because there is no way to recover a reference to this object again. (See chapter 4.)<br />
Question 14: d. The range of integer types goes from minus 2(number of bits - 1) to 2(number of bits - 1) minus 1. (See chapter 5.)<br />
Question 15: c. Even though there is an instance variable named index defined in the Car class, the local or automatic variable named index takes precedence. Since automatic variables do not have a default value, this code will not compile because it is uninitialized when we attempt to access the element in the args array. (See chapter 5.)<br />
Question 16: e. There’s nothing wrong with this code. 100 0's will appear in the standard output. (See chapter 5.)<br />
Question 17: a, b, c. The elements in arrays are initialized to their default values: 0, 0.0, null, false, or \u0000, depending on the data type.<br />
Question 18: "getParameter"<br />
Question 19: c. Assigning a subclass type to a superclass type is perfectly legal and will run fine at runtime.<br />
Question 20: a. You cannot assign an object to a sibling object reference, even with casting.<br />
Question 21: "c = ‘\u30A0’;" You can set a char to a Unicode sequence by matching the template \udddd, where dddd are four hexadecimal digits representing the Unicode character you want. (See chapter 5.)<br />
Question 22: b. Only + and += are overloaded for String objects.<br />
Question 23: b. Changing the break statement to break middle will break out of the loop named using the label middle and continue with the next iteration of the outer loop. The statement continue outer would also have this effect. (See chapter 7.)<br />
Question 24: c. NumberFormatException will be handled in the catch clause for Exception. Then, regardless of the return statements, the finally clause will be executed before control returns to the calling method. (See chapter 8.)<br />
Question 25: a. An explicit cast is needed to assign a superclass type to a subclass type.<br />
Question 26: b. If the object contained in a is not actually a Subclass1 object, the assignment will cause Java to throw a CastClassException. That would be the case in the code in this example.<br />
Question 27: "IOException" or "java.io.IOException"<br />
Question 28: c. A method in a subclass cannot add new exception types that it might throw. Since it’s superclass, Second, does not define any exceptions in its test() method, Third can’t either. (See chapter 8.)<br />
Question 29: c. The method with all double parameters is actually the only version of test() that the Java Virtual Machine can legally coerce the numbers to. The reason the other versions of test() are not invoked is that at least one of the parameters would have to be automatically coerced from a type with greater accuracy to a type with less accuracy, which is illegal. (See chapter 9.)<br />
Question 30: c. The Math method floor() finds the integer closest to but less than the parameter to floor(). The methods round() and ceil() would both result in 91, and min() and max() both require two parameters. (See chapter 10.)<br />
Question 31: "disable"<br />
Question 32: a. Both ceil() and round() will produce 15 from 14.9. The floor() method yields 14. (See chapter 10.)<br />
Question 33: a, b, c, d. The methods Java defines for trig operations include sin(), asin(), cos(), and tan(). (See chapter 10.)<br />
Question 34: d. The method equalsIgnoreCase() would return true for the two Strings a and b in the question. (See chapter 10.)<br />
Question 35: d. The method substring() starts at the first index, inclusive, with 0 being the first character), and ends at the end index - 1 (that is, exclusive of the end index). (See chapter 10.)<br />
Question 36: d. This is the default access control for methods and member variables.<br />
Question 37: b. The concat() method appends the characters passed to it to the characters in the String responding to the method call. The concat() method creates a new String, since Strings cannot be changed once they are created. (See chapter 10.)<br />
Question 38: a. The first line creates a File object that represents the file. By creating a FileOutputStream, you create the file if it does not yet exist, and open that file for reading and writing. (See chapter 11.)<br />
Question 39: d, c, e. You cannot assign an integer to a boolean—not even with casting. Also, the default type for a floating-point literal is double, and you cannot assign a double to a float without casting.<br />
Question 40: c, e. this is a reserved word, so it cannot be used as an identifier (such as a label). 2to1odds starts with a number, so it is also invalid as an identifier.<br />
Question 41: a. In order to write a primitive data type such as an int, you need to use a FilterInputStream subclass such as DataInputStream. This class defines writeInt(), which is perfect for our needs. (See chapter 11.)<br />
Question 42: "abstract"<br />
Question 43: c. Only the "c" from finally gets written out. The exception thrown doesn’t match the exception caught, so the catch block is not executed. Control returns to the caller after finally to see if there is a catch block there to handle this unchecked exception. If there is not (as is the case here), execution comes to an end.<br />
Question 44: e. This code compiles and runs fine. RandomAccessFile implements the DataOutput interface, so it does implement writeBytes(), among others. RandomAccessFile creates the file if it does not yet exist. (See chapter 11.)<br />
Question 45: c. The absolute path includes the drive name and the top-level directories, as well as the file name itself. (See chapter 11.)<br />
Question 46: d. The target object for a Thread must implement Runnable, which means it will pass the test:<br />
targetObject instanceof Runnable<br />
(See chapter 12.)<br />
Question 47: a. The thread's with start() method is never invoked. (This is not an applet, so init() is not automatically invoked.) (See chapter 12.)<br />
Question 48: b. The AWT invokes update() for the Component, which in invokes paint() in its default behavior. (See chapter 13.)<br />
Question 49: "ref instanceof MyInterface"<br />
Question 50: e. TextField defines a constructor that takes the number of columns, as shown in the example. TextField objects can have their text updated at any time, including long after they're created. (See chapter 13.)<br />
Question 51: b. The first yields false, and the others are not legal Java expressions (this is a wrapper type we’re using here…)<br />
Question 52: b. A FlowLayout arranges components in this way. (See chapter 13.)<br />
Question 53: a. North and South only can resize a component horizontally, to the width of the Container. (See chapter 13.)<br />
Question 54: c. Complicated as it might seem, this is the best way to accomplish this goal. First, you set the Container's LayoutManager to be a BorderLayout. Then, you create an intermediate Container and add each Component to this new Container that uses a FlowLayout. Finally, you add that Container to the "South" of the original Container. (See chapter 13.)<br />
Question 55: b. The program will compile fine. However, the Java interpreter specifically looks for a main() method declared as public and static, that returns no value, and that takes an array of String objects as its parameter.<br />
Question 56: c. The tag requires three keywords: code, width, and height.<br />
Question 57: "p.setBackground(Color.red);"<br />
Question 58: a. Use the getParameter() method, passing it the name of the value you want to retrieve. This method retrieves a String representing that value. (You can convert the String to a primitive data type using a wrapper class if you need to.)<br />
Question 59: c. The StringBuffer class does not override equals(). Hence, this class returns false when passed two different objects. (See chapter 6.)<br />
Question 60: d. The four parameters are the left, top, width, height, start angle (0 is the 3:00 position), and the arc angle (the arc ends at start angle plus the arc angle), drawn counter-clockwise.<br />
Question 61: b. The drawLine() method takes four parameters: the starting point and the ending point of the line to draw.<br />
Question 62: a, c. You can use drawRect() to draw a rectangle outline given its upper left point and width and height, and drawPolygon() to draw each of the four points of the square, plus an end point that is the same as the first point.<br />
Question 63: b. The hide() method is more-or-less the opposite of show() and removes a Component from the display.<br />
Question 64: a. Returning false indicates that method did not handle the event, which means AWT passes the event up the container hierarchy looking for someone who does want to handle it.<br />
Question 65: b, c, e. You cannot directly free the memory allocated by an object, though you can set an object reference to null. Also, The garbage collector only runs in low-memory situations, and so does not always reclaim an object’s memory as soon as it becomes a candidate for garbage collection.<br />
Question 66: d. setSize() is specific to Java 1.1.<br />
Question 67: c. These are Component methods. (The setColor() method is defined in the Graphics class.)<br />
Question 68: "16"<br />
Question 69: d. The && operator combines two boolean expressions.<br />
Question 70: d. The << operator shifts the bits the given number of places to the left.<br />
________________________________________</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Sun Certified Java Programmer<br />
Practice Exam ( 1 - 10 Questions)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 1<br />
What will happen if you compile/run this code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: public class Q1 extends Thread<br />
2: {<br />
3: public void run()<br />
4: {<br />
5: System.out.println("Before start method");<br />
6: this.stop();<br />
7: System.out.println("After stop method");<br />
8: }<br />
9:<br />
10: public static void main(String[] args)<br />
11: {<br />
12: Q1 a = new Q1();<br />
13: a.start();<br />
14: }<br />
15: }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Compilation error at line 7.<br />
B) Runtime exception at line 7.<br />
C) Prints "Before start method" and "After stop method".<br />
D) Prints "Before start method" only.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question 2</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What will happen if you compile/run the following code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: class Test<br />
2: {<br />
3: static void show()<br />
4: {<br />
5: System.out.println("Show method in Test class");<br />
6: }<br />
7:}<br />
8:<br />
9: public class Q2 extends Test<br />
10: {<br />
11: static void show()<br />
12: {<br />
13: System.out.println("Show method in Q2 class");<br />
14: }<br />
15: public static void main(String[] args)<br />
16: {<br />
17: Test t = new Test();<br />
18: t.show();<br />
19: Q2 q = new Q2();<br />
20: q.show();<br />
21:<br />
22: t = q;<br />
23: t.show();<br />
24:<br />
25: q = t;<br />
26: q.show();<br />
27: }<br />
28: }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) prints "Show method in Test class"<br />
"Show method in Q2 class"<br />
"Show method in Q2 class"<br />
"Show method in Q2 class"</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
B) prints "Show method in Test class"<br />
"Show method in Q2 class"<br />
"Show method in Test class"<br />
"Show method in Test class"</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
C) prints "Show method in Test class"<br />
"Show method in Q2 class"<br />
"Show method in Test class"<br />
"Show method in Q2 class"</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
D) Compilation error.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question 3<br />
The following code will give</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: class Test<br />
2: {<br />
3: void show()<br />
4: {<br />
5: System.out.println("non-static method in Test");<br />
6: }<br />
7: }<br />
8: public class Q3 extends Test<br />
9: {<br />
10: static void show()<br />
11: {<br />
12: System.out.println("Overridden non-static method in Q3");<br />
13: }<br />
14:<br />
15: public static void main(String[] args)<br />
16: {<br />
17: Q3 a = new Q3();<br />
18: }<br />
19: }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Compilation error at line 3.<br />
B) Compilation error at line 10.<br />
C) No compilation error, but runtime exception at line 3.<br />
D) No compilation error, but runtime exception at line 10.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question No :4<br />
The following code will give</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: class Test<br />
2: {<br />
3: static void show()<br />
4: {<br />
5: System.out.println("Static method in Test");<br />
6: }<br />
7: }<br />
8: public class Q4 extends Test<br />
9: {<br />
10: void show()<br />
11: {<br />
12: System.out.println("Overridden static method in Q4");<br />
13: }<br />
14: public static void main(String[] args)<br />
15: {<br />
16: }<br />
17: }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Compilation error at line 3.<br />
B) Compilation error at line 10.<br />
C) No compilation error, but runtime exception at line 3.<br />
D) No compilation error, but runtime exception at line 10.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question No :5<br />
The following code will print</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: int i = 1;<br />
2: i <>= 31;<br />
4: i >>= 1;<br />
5:<br />
6: int j = 1;<br />
7: j <>= 31;<br />
9:<br />
10: System.out.println("i = " +i );<br />
11: System.out.println("j = " +j);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) i = 1<br />
j = 1</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
B) i = -1<br />
j = 1</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
C) i = 1<br />
j = -1</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
D) i = -1<br />
j = -1</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question No :6<br />
The following code will print</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: Double a = new Double(Double.NaN);<br />
2: Double b = new Double(Double.NaN);<br />
3:<br />
4: if( Double.NaN == Double.NaN )<br />
5: System.out.println("True");<br />
6: else<br />
7: System.out.println("False");<br />
8:<br />
9: if( a.equals(b) )<br />
10: System.out.println("True");<br />
11: else<br />
12: System.out.println("False");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) True<br />
True</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
B) True<br />
False</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
C) False<br />
True</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
D) False<br />
False</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question No :7<br />
1: if( new Boolean("true") == new Boolean("true"))<br />
2: System.out.println("True");<br />
3: else<br />
4: System.out.println("False");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Compilation error.<br />
B) No compilation error, but runtime exception.<br />
C) Prints "True".<br />
D) Prints "False".</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question No :8</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: public class Q8<br />
2: {<br />
3: int i = 20;<br />
4: static<br />
5: {<br />
6: int i = 10;<br />
7:<br />
8: }<br />
9: public static void main(String[] args)<br />
10: {<br />
11: Q8 a = new Q8();<br />
12: System.out.println(a.i);<br />
13: }<br />
14: }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Compilation error, variable "i" declared twice.<br />
B) Compilation error, static initializers for initialization purpose only.<br />
C) Prints 10.<br />
D) Prints 20.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question No :9</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
The following code will give</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: Byte b1 = new Byte("127");<br />
2:<br />
3: if(b1.toString() == b1.toString())<br />
4: System.out.println("True");<br />
5: else<br />
6: System.out.println("False");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Compilation error, toString() is not avialable for Byte.<br />
B) Prints "True".<br />
C) Prints "False".</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question No :10<br />
What will happen if you compile/run this code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: public class Q10<br />
2: {<br />
3: public static void main(String[] args)<br />
4: {<br />
5: int i = 10;<br />
6: int j = 10;<br />
7: boolean b = false;<br />
8:<br />
9: if( b = i == j)<br />
10: System.out.println("True");<br />
11: else<br />
12: System.out.println("False");<br />
13: }<br />
14: }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Compilation error at line 9 .<br />
B) Runtime error exception at line 9.<br />
C) Prints "True".<br />
D) Prints "Fasle".</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question No: 1<br />
D. After the execution of stop() method, thread won't execute any more statements.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 1<br />
________________________________________<br />
Question No: 2<br />
D. Explicit casting is required at line 25.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 2<br />
________________________________________<br />
Question No: 3<br />
B. You cann't override an non-static method with static method.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 3<br />
________________________________________<br />
Question No: 4<br />
B. You cann't override a static method with non-static method.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 4<br />
________________________________________<br />
Question No: 5<br />
D.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 5<br />
________________________________________<br />
Question No: 6<br />
C.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 6<br />
________________________________________<br />
Question No: 7<br />
D.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 7<br />
________________________________________<br />
Question No: 8<br />
D. Here the variable '"i" defined in static initializer is local to that block only.<br />
The statements in the static initializers will be executed (only once) when the class is first created.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 8<br />
________________________________________<br />
Question No: 9<br />
C.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 9<br />
________________________________________<br />
Question No: 10<br />
C. Conditional operators have high precedence than assignment operators.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Sun Certified Java Programmer<br />
Practice Exam (11 - 20 Questions)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 11<br />
What will happen if you compile/run the following code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: public class Q11<br />
2: {<br />
3: static String str1 = "main method with String[] args";<br />
4: static String str2 = "main method with int[] args";<br />
5:<br />
6: public static void main(String[] args)<br />
7: {<br />
8: System.out.println(str1);<br />
9: }<br />
10:<br />
11: public static void main(int[] args)<br />
12: {<br />
13: System.out.println(str2);<br />
14: }<br />
15: }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Duplicate method main(), compilation error at line 6.<br />
B) Duplicate method main(), compilation error at line 11.<br />
C) Prints "main method with main String[] args".<br />
D) Prints "main method with main int[] args".</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question 12<br />
What is the output of the following code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: class Test<br />
2: {<br />
3: Test(int i)<br />
4: {<br />
5: System.out.println("Test(" +i +")");<br />
6: }<br />
7: }<br />
8:<br />
9: public class Q12<br />
10: {<br />
11: static Test t1 = new Test(1);<br />
12:<br />
13: Test t2 = new Test(2);<br />
14:<br />
15: static Test t3 = new Test(3);<br />
16:<br />
17: public static void main(String[] args)<br />
18: {<br />
19: Q12 Q = new Q12();<br />
20: }<br />
21: }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Test(1)<br />
Test(2)<br />
Test(3)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
B) Test(3)<br />
Test(2)<br />
Test(1)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
C) Test(2)<br />
Test(1)<br />
Test(3)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
D) Test(1)<br />
Test(3)<br />
Test(2)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question 13<br />
What is the output of the following code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: int i = 16;<br />
2: int j = 17;<br />
3:<br />
4: System.out.println("i >> 1 = " + (i >> 1));<br />
5: System.out.println("j >> 1 = " + (j >> 1));</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Prints "i >> 1 = 8"<br />
"j >> 1 = 8"</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
B) Prints "i >> 1 = 7"<br />
"j >> 1 = 7"</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
C) Prints "i >> 1 = 8"<br />
"j >> 1 = 9"</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
D) Prints "i >> 1 = 7"<br />
"j >> 1 = 8"</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question 14<br />
What is the output of the following code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: int i = 45678;<br />
2: int j = ~i;<br />
3:<br />
4: System.out.println(j);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Compilation error at line 2. ~ operator applicable to boolean values only.<br />
B) Prints 45677.<br />
C) Prints -45677.<br />
D) Prints -45679.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Practice Exam ( 21 - 30 Questions)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question 21<br />
What will happen if you compile/run the following code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: public class Q21<br />
2: {<br />
3: int maxElements;<br />
4:<br />
5: void Q21()<br />
6: {<br />
7: maxElements = 100;<br />
8: System.out.println(maxElements);<br />
9: }<br />
10:<br />
11: Q21(int i)<br />
12: {<br />
13: maxElements = i;<br />
14: System.out.println(maxElements);<br />
15: }<br />
16:<br />
17: public static void main(String[] args)<br />
18: {<br />
19: Q21 a = new Q21();<br />
20: Q21 b = new Q21(999);<br />
21: }<br />
22: }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Prints 100 and 999.<br />
B) Prints 999 and 100.<br />
C) Compilation error at line 3, variable maxElements was not initialized.<br />
D) Compillation error at line 19.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question 22<br />
What will happen if run the following code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: Boolean[] b1 = new Boolean[10];<br />
2:<br />
3: boolean[] b2 = new boolean[10];<br />
4:<br />
6: System.out.println("The value of b1[1] = " +b1[1]);<br />
7: System.out.println("The value of b2[1] = " +b2[1]);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Prints "The value of b1[1] = false"<br />
"The value of b2[1] = false".</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
B) Prints "The value of b1[1] = null"<br />
"The value of b2[1] = null".</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
C) Prints "The value of b1[1] = null"<br />
"The value of b2[1] = false".</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
D) Prints "The value of b1[1] = false"<br />
"The value of b2[1] = null".</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question 23<br />
Which of the following are valid array declarations/definitions?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: int iArray1[10];<br />
2: int iArray2[];<br />
3: int iArray3[] = new int[10];<br />
4: int iArray4[10] = new int[10];<br />
5: int []iArray5 = new int[10];<br />
6: int iArray6[] = new int[];<br />
7: int iArray7[] = null;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) 1.<br />
B) 2.<br />
C) 3.<br />
D) 4.<br />
E) 5.<br />
F) 6.<br />
G) 7.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer<br />
________________________________________<br />
Question 24<br />
What is the output for the following lines of code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: System.out.println(" " +2 + 3);<br />
2: System.out.println(2 + 3);<br />
3: System.out.println(2 + 3 +"");<br />
4: System.out.println(2 + "" +3);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Compilation error at line 3<br />
B) Prints 23, 5, 5 and 23.<br />
C) Prints 5, 5, 5 and 23.<br />
D) Prints 23, 5, 23 and 23.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 25<br />
The following declaration(as a member variable) is legal.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
static final transient int maxElements = 100;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) True.<br />
B) False.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 26<br />
What will happen if you compile/run the following lines of code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: int[] iArray = new int[10];<br />
2:<br />
3: iArray.length = 15;<br />
4:<br />
5: System.out.println(iArray.length);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Prints 10.<br />
B) Prints 15.<br />
C) Compilation error, you can't change the length of an array.<br />
D) Runtime exception at line 3.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 27<br />
What will happen if you compile/run the folowing lines of code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: Vector a = new Vector();<br />
2:<br />
3: a.addElement(10);<br />
4:<br />
5: System.out.println(a.elementAt(0));</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Prints 10.<br />
B) Prints 11.<br />
C) Compilation error at line 3.<br />
D) Prints some garbage.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 28<br />
What will happen if you invoke the following method?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: public void check()<br />
2: {<br />
3: System.out.println(Math.min(-0.0,+0.0));<br />
4: System.out.println(Math.max(-0.0,+0.0));<br />
5: System.out.println(Math.min(-0.0,+0.0) == Math.max(0.0,+0.0));<br />
6: }</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) prints -0.0, +0.0 and false.<br />
B) prints -0.0, +0.0 and true.<br />
C) prints 0.0, 0.0 and false.<br />
D) prints 0.0, 0.0 and true.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 29<br />
What will happen if you compile/run this code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
1: int i = 012;<br />
2: int j = 034;<br />
3: int k = 056;<br />
4: int l = 078;<br />
5:<br />
6: System.out.println(i);<br />
7: System.out.println(j);<br />
8: System.out.println(k);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) Prints 12,34 and 56.<br />
B) Prints 24,68 and 112.<br />
C) Prints 10, 28 and 46.<br />
D) Compilation error.</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Answer</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 30<br />
When executed the following line of code will print</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(-1 * Double.NEGATIVE_INFINITY);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
A) -Infinity<br />
B) Infinity<br />
C) NaN<br />
D) -NaN</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<b>Answers</b><br />
<span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: small; line-height: normal;"></span><br />
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question No 21<br />
D. Constructors should not return any value. Java won't allow to show with void.<br />
In this case void Q21() is an ordinary method which has the same name of the Class.<br />
________________________________________<br />
Question No 22<br />
C. By default objects will be initialized to null and primitives to their corresponding default values.<br />
The same rule applies to array of objects and primitives.</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 22<br />
________________________________________<br />
Question No 23<br />
B,C,E and G. You can't specify the array dimension in type specification(left hand side),<br />
so A and D are invalid. In line 6 the array dimension is missing(right hand side) so F is invalid.<br />
You can intialize an array with null. so G is valid.</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<br />
Back to Question 23<br />
________________________________________</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Question No 24<br />
B.</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 24<br />
________________________________________<br />
Question No 25<br />
A.</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 25<br />
________________________________________<br />
Question No 26<br />
C. Once array is created then it is not possible to change the length of the array.</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 26<br />
________________________________________<br />
Question No 27<br />
C. You can't add primitives to Vector. Here 10 is int type primitive.</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 27<br />
________________________________________<br />
Question No 28<br />
B. The order of floating/double values is<br />
-Infinity --> Negative Numbers/Fractions --> -0.0 --> +0.0 --> Positive Numbers/Fractions --> Infinity.</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 28<br />
________________________________________<br />
Question No 29<br />
D. Here integers are assigned by octal values. Octal numbers will contain digits from 0 to 7.<br />
8 is illegal digit for an octal value, so you get compilation error.</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 29<br />
________________________________________<br />
Question No 30<br />
B. Compile and see the result.</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Back to Question 30</div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
<br /></div>
<div style="font: normal normal normal 15px/1.625 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
</div>
<br />
<br />
<br /></div>
</div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com76tag:blogger.com,1999:blog-7382811498705583939.post-90738701691601058182011-09-16T16:50:00.005-04:002011-09-17T11:27:10.515-04:00Java Interview Questions - Part1<span class="Apple-style-span" style="color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, "Nimbus Sans L", sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Java aptitude/interview questions - <strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Part 1</strong></div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
This is Objectives type java question with answers which will help fresh engineering graduates to crack the interview and java aptitude test.<br />
________________________________________<br />
Question 1) Which of the following lines will compile without warning or error.<br />
1) float f=1.3;<br />
2) char c="a";<br />
3) byte b=257;<br />
4) boolean b=null;<br />
5) int i=10;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
__________<img alt="" class="mceWPmore mceItemNoResize" data-mce-src="http://prayasek.wordpress.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" src="http://prayasek.wordpress.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" style="background-color: transparent; background-image: url("http://prayasek.wordpress.com/wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif"); background-position: 100% 0%; background-repeat: no-repeat no-repeat; border-top-color: rgb(204, 204, 204); border-top-style: dotted; border-width: 1px 0px 0px; display: block; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; height: 12px; margin: 15px auto 0px; padding: 6px; width: 554px;" title="More..." /></div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
______________________________<br />
Question 2)<br />
What will happen if you try to compile and run the following code<br />
public class MyClass {<br />
public static void main(String arguments[]) {<br />
amethod(arguments);<br />
}<br />
public void amethod(String[] arguments) {<br />
System.out.println(arguments);<br />
System.out.println(arguments[1]);<br />
}<br />
}<br />
1) error Can't make static reference to void amethod.<br />
2) error method main not correct<br />
3) error array must include parameter<br />
4) amethod must be declared with String<br />
________________________________________<br />
Question 3)<br />
Which of the following will compile without error<br />
1)<br />
import java.awt.*;<br />
package Mypackage;<br />
class Myclass {}<br />
2)<br />
package MyPackage;<br />
import java.awt.*;<br />
class MyClass{}<br />
3)<br />
/*This is a comment */</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
package MyPackage;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
import java.awt.*;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
class MyClass{}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 4)<br />
A byte can be of what size<br />
1) -128 to 127<br />
2) (-2 power 8 )-1 to 2 power 8<br />
3) -255 to 256<br />
4)depends on the particular implementation of the Java Virtual machine</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 5)<br />
What will be printed out if this code is run with the following command line?<br />
java myprog good morning<br />
public class myprog{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[])<br />
{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(argv[2])</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
}<br />
1) myprog<br />
2) good<br />
3) morning<br />
4) Exception raised: "java.lang.ArrayIndexOutOfBoundsException: 2"</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 6)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Which of the following are java reserved words?<br />
1) if<br />
2) then<br />
3) goto<br />
4) while<br />
5) case<br />
________________________________________<br />
Question 7)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
Which of the following are legal identifiers<br />
1) 2variable<br />
2) variable2<br />
3) _whatavariable<br />
4) _3_<br />
5) $anothervar<br />
6) #myvar<br />
________________________________________<br />
Question 8)<br />
What will happen when you compile and run the following code?</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public class MyClass{</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
static int i;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(i);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
1) Error Variable i may not have been initialized<br />
2) null<br />
3) 1<br />
4) 0<br />
________________________________________<br />
Question 9)<br />
What will happen if you try to compile and run the following code?<br />
public class Q {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int anar[]=new int[]{1,2,3};</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(anar[1]);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
1) 1<br />
2) Error anar is referenced before it is initialized<br />
3) 2<br />
4) Error: size of array must be defined</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
________________________________________<br />
Question 10)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What will happen if you try to compile and run the following code?<br />
public class Q {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int anar[]=new int[5];</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(anar[0]);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
1) Error: anar is referenced before it is initialized<br />
2) null<br />
3) 0<br />
4) 5<br />
________________________________________<br />
Question 11)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
What will be the result of attempting to compile and run the following code?<br />
abstract class MineBase {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
abstract void amethod();</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
static int i;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
public class Mine extends MineBase {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
public static void main(String argv[]){</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int[] ar=new int[5];</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
for(i=0;i < ar.length;i++)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println(ar[i]);</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
1) a sequence of 5 0's will be printed<br />
2) Error: ar is used before it is initialized<br />
3) Error Mine must be declared abstract<br />
4) IndexOutOfBoundes Error<br />
________________________________________<br />
Question 12)<br />
What will be printed out if you attempt to compile and run the following code ?<br />
int i=1;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
switch (i) {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
case 0:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("zero");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
break;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
case 1:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("one");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
case 2:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("two");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
default:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("default");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
1) one<br />
2) one, default<br />
3) one, two, default<br />
4) default<br />
________________________________________<br />
Question 13)<br />
What will be printed out if you attempt to compile and run the following code?<br />
int i=9;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
switch (i) {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
default:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("default");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
case 0:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("zero");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
break;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
case 1:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("one");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
case 2:</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("two");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
1) default<br />
2) default, zero<br />
3) error default clause not defined<br />
4) no output displayed<br />
________________________________________<br />
Question 14)<br />
Which of the following lines of code will compile without error<br />
1)<br />
int i=0;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
if(i) {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("Hello");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
2)<br />
boolean b=true;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
boolean b2=true;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
if(b==b2) {</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("So true");</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
}<br />
3)<br />
int i=1;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int j=2;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
if(i==1|| j==2)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("OK");<br />
4)<br />
int i=1;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
int j=2;</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
if(i==1 &| j==2)</div>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
System.out.println("OK");</div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com13tag:blogger.com,1999:blog-7382811498705583939.post-82444858592268424792011-09-16T16:48:00.003-04:002011-09-19T11:43:32.564-04:00While Loop : An SQL Server 2005 alternative for cursors<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>
While Loop in SQL Server</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
SQL Server 2005 alternative for cursors is <strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">While</strong> loop. SQL Server 2005 provides a while loop which we can use to iterate through any table having at least one column. The column must have unique value (primary key is generally prefered). A sample code is provided below which is MSSQL Server Specific code and is at least 5 times faster than cursor.</div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
Declare @PresentIDint;<br />
Set @PresentID = (Select min(column_name) from your_table );</div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
</div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
/*Starts the iterrational loop*/<br />
While @PresentID is not null</div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
Begin</div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
/*Code segment where you have access to @PresentID*/<br />
/*Next line required to keep iterating*/<br />
Set @PresentID = (Select min(column_name) from your_table where column_name > @PresentID);</div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
End</div>
<h2 style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<b><br /></b></h2>
<div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 850px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 91.3pt;" valign="top" width="122"><div class="MsoNormal">
<b><span style="color: white;">Relevant AD<o:p></o:p></span></b></div>
</td>
<td style="background: yellow; border-left: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 398.75pt;" valign="top" width="532"><div class="MsoNormal">
<b><span style="color: #0f243e;">This ad may be
helpful, if relevant to your search.<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<script type="text/javascript">
<!--
google_ad_client = "pub-0413634368644504";
/* 728x90, created 9/19/11 */
google_ad_slot = "4620530839";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
</div>
</td>
</tr>
</tbody></table>
</div>
<h2 style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<b><br /></b></h2>
<div>
<b><br /></b></div>
<h2 style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<b>
Summary</b></h2>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Cursor is an SQL Server 2000 feature similar to the iteration loop available in the several programming languages. The nearest match for Cursor is While loop and For Loop in the programming languages. Cursor should be avoided as much as possible.</div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<em style="font-style: italic; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">[<span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Did you like this post ? Do leave a comment or share with your Facebook friends. This will give me more reasons to write such posts.</span>]</em></div>
</div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com10Decatur, GA, USA33.7748275 -84.296312333.74843 -84.3357943 33.801225 -84.25683029999999tag:blogger.com,1999:blog-7382811498705583939.post-72850645332456383252011-09-16T16:47:00.001-04:002011-09-19T11:49:19.461-04:00Attack to Gmail using DigiNotar SSL Certificate: Its effects to gmail users.<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>
Gmail Attack by Hackers</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Last Saturday/Sunday, the world-famous emailing system, GMail was attacked by some hackers who mainly targeted the Iranian Gmail users. Attackers could do that because they managed to get (more accurately we can say, they stolen) a valid SSL certificate issued for google.com domain.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Are you thinking that it a big news ? Well you might not be the hundred percent right. The bigger news is still to come. The targeted attack to Gmail system is only the tip of the iceberg. We should be taking some concrete steps to protect ourself before any of us becomes one of the victim in coming days.<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 850px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 91.3pt;" valign="top" width="122"><div class="MsoNormal">
<b><span style="color: white;">Relevant AD<o:p></o:p></span></b></div>
</td>
<td style="background: yellow; border-left: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 398.75pt;" valign="top" width="532"><div class="MsoNormal">
<b><span style="color: #0f243e;">This ad may be
helpful, if relevant to your search.<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<script type="text/javascript">
<!--
google_ad_client = "pub-0413634368644504";
/* 728x90, created 9/19/11 */
google_ad_slot = "4620530839";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
</div>
</td>
</tr>
</tbody></table>
</div>
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>
How Deep is the attack ?</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
It is not the only one certificate which hackers manged to get/steal originally issued to google domain. Security Analysts are saying that hackers have stolen more than <strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">200 SSL certificates</strong> issued to several famous web sites.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
As per DigiNotar, they revoked the certificate as soon as they came to know that the SSL certificate issued to google.com, actually did not mean for Google. They took almost seven days to identify this hacking attack before they revoked certificate issue to Google.com.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
The question here is; are they not following some logging procedure during issuing a digital certificates? Are they not auditing the logs ? If they would have audited the logs, they could have easily came to know about this hacking attack within a day of issuing the SSL certificate. The SSL issuing CA should understand that they in this market to sell Belief rather than any thing even an SSL certificate.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
DigiNotar say that the moment they realized this attack, they revoked the compromised certificate. As per them this is the only certificate which they issued by mistake. But how can we believe that there is only one certificate issued by them to hacker because they took seven days to identify a single certificate that it has been compromised. They may not be telling us about more or they may still be analyzing most of the other certificate which they issue in recent past.</div>
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
</h1>
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>
Corrective Actions by Web Browser Companies</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Mozilla and Google has already released the patches to their browser which users can download to help them safeguard from this attack. Microsoft has also issued patches for IE and also for Windows 2008 and Windows 7 (few other too) too. But they have not issued any patches for Windows XP and Windows 2003. As per Microsoft they will release it later.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Now a big question is, how much open we are to a future attacks, given the fact that hacker have stolen 200+ digicetal rtificates, which can easily make us fool to think that the site which we are using is what they says. I have no concrete answer here to suggest you about to safeguard yourself.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<a data-mce-href="http://prayas.info/2011/08/30/gmail-attacked-how-to-safeguard-yourself/" href="http://prayas.info/2011/08/30/gmail-attacked-how-to-safeguard-yourself/" style="color: #1b8be0; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: none;" title="Recent attack to Gmail : How to safeguard yourself.">Check this also on Recent Gmail attack: What action do you need to take.</a></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
[<em style="font-style: italic; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Did you like this post ? Do leave a comment or share with your Facebook friends. This will give me more reasons to write such posts</span>.]</em></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<br /></div>
</div>
Prayas Systemshttp://www.blogger.com/profile/14231877793868530874noreply@blogger.com41Decatur, GA, USA33.7748275 -84.296312333.74843 -84.3357943 33.801225 -84.25683029999999tag:blogger.com,1999:blog-7382811498705583939.post-65814263046432762872011-09-16T13:59:00.000-04:002011-09-19T11:49:59.750-04:00Attack to Iranian Gmail users: How to safeguard yourself.<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>
Attack to Iranian Gmail Users</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
This Saturday/Sunday, the world-famous emailing system, GMail was attacked by some hackers who mainly targeted the Iranian Gmail users. This imposes a huge information leak risk for other gmail users too, if they do not validate correctly about the digital certificate before providing user-id and password in Gmail log-in page. This very important to safeguard a gmail user itself from being a victim of such attack.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
As per google's statement, the attackers somehow managed to get a Secure Socket Layer (SSL) certificate issued to <strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">*.google.com</strong> domain. This means that the attackers had a valid certificate which they were able to use to fool any web site surfer that the site they are using is actually a Google's site.<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 850px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 91.3pt;" valign="top" width="122"><div class="MsoNormal">
<b><span style="color: white;">Relevant AD<o:p></o:p></span></b></div>
</td>
<td style="background: yellow; border-left: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 398.75pt;" valign="top" width="532"><div class="MsoNormal">
<b><span style="color: #0f243e;">This ad may be
helpful, if relevant to your search.<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<script type="text/javascript">
<!--
google_ad_client = "pub-0413634368644504";
/* 728x90, created 9/19/11 */
google_ad_slot = "4620530839";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
</div>
</td>
</tr>
</tbody></table>
</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Now, the main question, which will provide you a solution too, is how did they get a valid SSL certificate issued for Google's domain?</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<em style="font-style: italic; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">In the internet world, there are some private/public (but mainly private) companies who are very famous or mainly authorized by the government of a country to issue these SSL certificates to a person or an organization</em>. These companies are called as Certificate Authority or CA. Individuals or organizations who are requesting such SSL certificate, need to provide a valid set of documents proving their identity along with theirs address proofs, in order to prove what they are claiming for and who they are. Its a responsibility of CA to confirm such requests and requester's identity and other stuffs before issuing a digital certificate.</div>
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>
How Hackers could plan and execute the attack</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
In this hacking fraud case, the DigiNotar CA, a Dutch company, issued an SSL digital certificate to a non verified entity with the valid certificate for *.Google.com domain. This gave the attackers to fool the users and gained some type controls over the gmail accounts of several user's; those end-user who believed that they are opening a genuine Gmail site. The attackers used this valid (but not for them logically) certificate along with the DNS entry details to hack some of Iranian Gmail users.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
The important thing to note here is that Google uses different CA for their SSL certificate not this CA ie. DigiNoter.</div>
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>
Immediate Available Solutions</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
All of us should now not believe this CA i.e DigiNotar. Go ahead and delete to root certificate of the CA which is stored in your computer's certificate store. Don't know how to open the certificate store ? No Problem. Refer my another article "Digital certificate and secure communication" on this site. You will come to know how to open the certificate store.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
For more details on this recent Gmail attack news, refer <a data-mce-href="http://www.pcworld.com/businesscenter/article/239112/google_says_gmail_attack_focused_on_iranian_targets.html" href="http://www.pcworld.com/businesscenter/article/239112/google_says_gmail_attack_focused_on_iranian_targets.html" style="color: #1b8be0; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: none;">this link</a>. Google has re-configured its Chrome browser to flag a warning if the user's PC is trying to use this certificate issued by The important thing to note here is the Google uses different CA for their SSL certificate not this CA i.e. DigiNotar.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Mozilla, in its blogs, said that they will soon release a new version Firefox to fix this issue by not trusting this CA.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Microsoft also said on Monday, that they will remove the DigiNotar from its trusted certificate provider list in the internet explorer browser.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
But these preventive steps will take time, at least few days. So better we should manually remove all the root certificates of this CA from our computers. You can <a data-mce-href="http://prayas.info/2011/08/22/webcommunication-digitalcertificate/" href="http://prayas.info/2011/08/22/webcommunication-digitalcertificate/" style="color: #1b8be0; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: none;" title="Securing web communication using Digital Certificates">check another post here </a>about how to remove a digital SSL certificate from your computer if is not an authenticate one and need to be removed or need to be put into the blacklisted list.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
[<em style="font-style: italic; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Did you like this post ? Do leave a comment or share with your Facebook friends. This will give me more reasons to write such posts</span>.]</em></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<br /></div>
</div>
Unknownnoreply@blogger.com96Decatur, GA, USA33.7748275 -84.296312333.74843 -84.3357943 33.801225 -84.25683029999999tag:blogger.com,1999:blog-7382811498705583939.post-11421399988863515782011-09-15T19:43:00.000-04:002014-11-27T11:37:43.452-05:00Productivity in Industrial Engineering<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b><span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>Introduction</b></span>: </b></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">A high level guide helping us to understand the current trends in Industrial Engineering Productivity factors which can affect an organization. This post will highlight the factors and scope which can lead the change in productivity in a company. This introductory level post is written from Industrial engineering systems perspective.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>PRODUCTIVITY - Aspects And Concerns</b></span></span></span><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" />Productivity in industrial engineering is one of the most discussed and burning issues of the current world. In a common man’s language it can be said to be the rate at which any company or industry produces its products to sustain in the market.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span style="line-height: 1.625;">Technically it can be defined as the ratio of the output to the input, or it is the multiple effects of efficiency and effectiveness. Productivity plays a very vital and crucial role in every one of our lives. Seeing its need and importance, the European Productivity Agency (EPA) has defined productivity as, “It is the function of providing more and more everything to more and more people with less consumption of resources”.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Now a days productivity is one of the most discussed topics in any industry as the increased productivity can lead any industry to great success in the market. Industries are adopting various innovative techniques to increase their productivity and that too by maintaining the standards of the organization, and in every possible way in a reduced period of time.</span></div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"><span data-mce-style="color: #000000; text-decoration: underline;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"><b>SCOPE OF PRODUCTIVITY</b></span></span></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">As mentioned above an increased productivity can take any organization to great success in the market and help the companies to create its impact on the customers. Following are the scopes of productivity:</span></div>
<ul style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 1.625em; margin-left: 2.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<li data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-align: justify;"><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">It helps to increase the rate of production, i.e. more number of products will be manufacture and that too in a very less amount of time. This will ultimately lead to large number of products being available for the ever-increasing demands of the customers in the market.</span></li>
<li data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-align: justify;"><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">As the organization focuses on increasing its product quality, but they can’t compromise with the quality of the product. So, it ultimately helps in maintaining the quality of the product to survive in the market.</span></li>
<li data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-align: justify;"><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">As the productivity will be increased, more and more number of products will be available to the customers in the market and so their quality of life can get improved.</span></li>
<li data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-align: justify;"><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">It is a general trend in the market that, if the demand of the product is higher then cost of the product increases, and if the demand of the product is less then cost of the product decreases. This means, a greater amount of productivity can control over the cost of the product.</span></li>
<li data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-align: justify;"><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Finally the most important and very common benefit of an increased productivity is that the organization will be in profit. It will make more money. This extra benefit of the organization can be invested to do business in the different areas of the market, or to give an increased pay to the workers which will in turn be helpful in increasing the productivity of the organization.</span></li>
</ul>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"><span data-mce-style="color: #000000; text-decoration: underline;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"><b>FACTORS AFFECTING PRODUCTIVITY</b></span></span></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Productivity, as every other concern on this earth, depends on various factors effecting it, both positively and negatively. The various factors affecting productivity are as follows:</span></div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<b><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">1. </span><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Internal Factors/ Controllable Factors</span></span></span></b></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">a)</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Human Resource</span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">They are the fuel of any industry. As any vehicle runs on petrol or diesel, an industry runs on its human resource. They produce the products in the industry. The quality of product depends on the quality of the worker. If workers are not educated and not given proper training, then they are not able to give justice to their work.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="font-family: Times New Roman; color: #000000; font-size: small;" style="color: black; font-family: 'Times New Roman'; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"> </span><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">b)</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Incentive Schemes</span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">The psychological stability of the workers is very mush essential for them to work efficiently for the production of good quality of products. Incentive schemes can be used to motivate the employees by giving extra payment as bonus or promotion.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Organization can also use non monetary incentive schemes such as offering challenging jobs to the workers, appreciating their works, etc. to motivate the workers and to keep them psychologically sound.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">c)</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Workers’ Participation in the Management</span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Organization should allow a healthy participation of the workers in the management works to develop mutual understanding and co-operation between the workers and the management; to have a healthy work environment for the workers. This healthly work environment will increase the overall productivity of an organization.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">d)</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Management by Objective (MBO)</span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">It is one of the latest measures in the field of increasing productivity. In this process the superiors and the sub- ordinates of the organization jointly identify the expected results of each person and later access these information about the work done by each individual. This is done to utilize the maximum potential of every worker, resulting in an increased productivity.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">e)</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Quality circle</span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">It is also one of the new and innovative techniques adopted by the leading companies in the market to increase their productivity. It is a small group of workers which meets at a regular interval of time to discuss about the various problems faced during work, investigate the causes of the problem and take corrective measures if authorized. It usually consists of 5-15 members who collectively identify the problems related to the workers mainly.</span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"><span data-mce-style="font-family: Times New Roman; color: #000000; font-size: small; text-decoration: underline;" style="color: black; font-family: 'Times New Roman'; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;"> </span></span></strong></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">f)</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Communication System</span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Communication is the way of expressing one’s feelings to others. There must not be communication gap in any organization, as it can lead to misunderstanding which hampers productivity.</span><span data-mce-style="font-family: Times New Roman; color: #000000; font-size: small;" style="color: black; font-family: 'Times New Roman'; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"> </span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">g)</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Man Power Planning</span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">The man power requirements of any industry must be carefully planned by keeping in view the number of workers required, their required skills, the training needs, etc. This will provide the industry with quality workers who can give justice to their works.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="font-family: Times New Roman; color: #000000; font-size: small;" style="color: black; font-family: 'Times New Roman'; font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"> </span><span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">h)</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Working Hours</span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">According to the International Labour Organization (ILO) the working tine for workers is 40 hours/week. Any organization should follow the regulation of working hours. Extra and excessive hours increase fatigue and reduce productivity.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">i)</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Technology</span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">The organization should give emphasis on the use of technologically advanced machinery, as they are far more efficient and time saving than the out dated machineries. With the use of the new technology, production can be increased many folds and that too in very less time.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">j)</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">Working Conditions</span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Various working conditions existing in the industry such as lighting, ventilation, noise reduction units, etc. must be maintained properly to increase the efficiency of the workers for an increased productivity.</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">2.</span> </span><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="text-decoration: underline;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: underline;">External Factors/ Uncontrollable Factors </span></strong></span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">These are the conditions existing outside the premises of any organization but have their impact on the rate of production of products in any industry. The organizations are helpless in front of these factors and are bound to act accordingly. The various external factors are</span></div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">a)</span> </span>Government Policies</span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">b)</span> </span>Customer Demands</span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">c)</span> </span>Market Trends</span><br />
<span data-mce-style="color: #000000;" style="color: black; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-family: Times New Roman;" style="font-family: 'Times New Roman'; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><span data-mce-style="font-size: small;" style="font-size: x-small; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">d)</span> </span>Natural Calamities, etc.</span></div>
<div style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">[</strong>About the Author: <strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Sheikh Hyder Ali </strong>is a third year Mechanical engineering student in<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Maharashtra, India</strong>. If you have any concern or question about this post, please contact the author on his personal email id <a data-mce-href="mailto:Sheikh.Hyder@prayas.info" href="mailto:Sheikh.Hyder@prayas.info" style="color: #1b8be0; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: none;">Sheikh.Hyder@prayas.info</a><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">]</strong></div>
</div>
Unknownnoreply@blogger.com89Pandharpur, Maharashtra, India17.675128 75.32677217.64487 75.28729 17.705386 75.366254000000012tag:blogger.com,1999:blog-7382811498705583939.post-49937929085598518182011-09-14T13:28:00.000-04:002011-09-17T11:26:02.349-04:00Indian Members of Parliament (MP) armed with iPad - Going Hightech<span class="Apple-style-span" style="color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, "Nimbus Sans L", sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<h1 style="clear: both; color: black; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0px 0px 0.81em;">
<strong>Indian MPs going Hightech</strong></h1>
<div style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em;">
The Indian members of parliament (MP), though countable on fingers, started thinking out of the box. They are very tech savy now and going hightech. They are not lagging behind any IT professional, at least in terms of using the electronic gadgets. They are armed with the latest technology available in the world.<br />
At least a Hightech Bharatiya Janata Party MP, Anil Madhav Dave thinks in the similar fashion. He uses the famous iPad tablet for his personal and official work. The reader should know that he a <em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">member of parliament from Madhya Pradesh,</em> where most of the people lives behind poverty line and might not have seen a TV, leave about hearing a name, IPad. The honorable MP thinks that using an iPad and other electronic product in day to day life, will reduce the paper and paper related work by at least 80%. Well, I also agree with him.</div>
<div data-mce-style="text-align: justify;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em; text-align: justify;">
Not only the political leaders but other famous leaders from different part of the society also started thinking in the same way. They are using latest hightech gadgets like smartphone, tablets including iPad and Android based. Some of you may also think that how much useful these devices will be if Indian government starts distributing it to every MP? To get the full advantage of these kind of device, most of the MP should start using such kind of stuffs. There will not be any benefit if one or two MP are using such devices.</div>
<h2 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0px 0px 0.81em; text-align: justify;">
<strong>Capability Issue</strong></h2>
<div data-mce-style="text-align: justify;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em; text-align: justify;">
It also raises a big question in front of us. How many <em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Indian member of parliaments</strong></em> are capable of using such advance devices? Several MP might not be knowing that how to sign a document simply because of the reason that they don't know writing either in Hindi or English.</div>
<div data-mce-style="text-align: justify;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em; text-align: justify;">
I believe, We (<em style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;"><strong style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif;">Indian MPs at lest</strong></em>) have to go a log way to integrate these technological advancements as a part of our life.</div>
<div data-mce-style="text-align: justify;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em; text-align: justify;">
You can also check out<a data-mce-href="http://www.siliconindia.com/shownews/MPs_Armed_with_iPads_Is_This_a_New_Beginning-nid-90382.html" href="http://www.siliconindia.com/shownews/MPs_Armed_with_iPads_Is_This_a_New_Beginning-nid-90382.html" style="color: #1b8be0; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; text-decoration: none;"> this link </a>for more details. We can conclude that indian members of parliament are going hightech and armed with ipad and other similar devices but it will years to come to see the actual change in indian society.</div>
Unknownnoreply@blogger.com13tag:blogger.com,1999:blog-7382811498705583939.post-86902450983777763962011-09-14T13:26:00.001-04:002011-09-19T11:50:57.203-04:00Infosys plans to distribute shares to employees<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Infosys is planning to surprise its employees before this Deepawali. The company will distribute more than 28 lakhs of its shares to all of its permanent employees, promoter and others.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Infosys will distribute 656 crore rupee worth shares. It is waiting for an approval from Bombay Stock Exchange and its further internal decision, after which it can start distributing the shares to its employees before this year-end which can be considered as bonus gift by its employees. Those who have more 10% of shares will not be eligible for this benefit.<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 850px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 91.3pt;" valign="top" width="122"><div class="MsoNormal">
<b><span style="color: white;">Relevant AD<o:p></o:p></span></b></div>
</td>
<td style="background: yellow; border-left: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 398.75pt;" valign="top" width="532"><div class="MsoNormal">
<b><span style="color: #0f243e;">This ad may be
helpful, if relevant to your search.<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<script type="text/javascript">
<!--
google_ad_client = "pub-0413634368644504";
/* 728x90, created 9/19/11 */
google_ad_slot = "4620530839";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
</div>
</td>
</tr>
</tbody></table>
</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Infosys always believed that shareholder are the main pillars for the growth of the company. So further to this belief, company is planning to include its own employees as the shared holders. This will help company grow faster because once employees start feeling that its their own company and company also values their work, employees will start contributing more for the company growth in the form of total dedication in their day-to-day work.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
This information is based on the news posted on IT Pro. See the below link for full detail.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
<a data-mce-href="http://www.itpro.in/626473/infosys-employees-eligible-for-656-crore-stock" href="http://www.itpro.in/626473/infosys-employees-eligible-for-656-crore-stock" style="color: #1b8be0; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: none;">http://www.itpro.in/626473/infosys-employees-eligible-for-656-crore-stock</a></div>
</div>
Unknownnoreply@blogger.com8tag:blogger.com,1999:blog-7382811498705583939.post-8191195567391035022011-09-14T13:25:00.000-04:002014-11-27T11:34:59.440-05:00Open Source Content Management System for Financial Clients<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Nimbus Sans L', sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;"></span><br />
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>Introduction</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
This post will introduce the concept of content management system to beginners. We will discuss some suitable open source content management sytems for finanicial clients. This post will also suggest some open source content management systems which are best suitable in market for financial clients like Banks.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
</div>
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>Content Management Systems</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Content management systems is famous by its name CMS. A content management system is ready-made software which can be installed by any type of business on their own servers. CMS helps users to easily collaborate their day-to-day activity like project meetings organizations, news broadcasting, centralized file management and many other features. Each CMS users can create their own pages. Each page can provide a well-defined set of functionalities. A user needs not to be a developer to create a new pages. They will just need to choose what type of feature they are in search of. As for example, if a user wants to create a page to keep track for its project documents, he/she can go the template library available in the CMS. Then he/she can select the template which will be the best suitable for his required functionality.</div>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
This document aims to introduce/describe some of the open source CMS which will be helpful to the financial clients like Banks. There several content management systems present in open source market. Each of them provides different functionality which may not be present in other. Some of the features which are must for financial clients may not be available in some CMS.</div>
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>CMS Features</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
The most of the commons feature of a content management system are as following.</div>
<h3 data-mce-style="padding-left: 30px;" style="clear: both; font-size: 10px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: 0.1em; line-height: 2.6em; padding-left: 30px; text-transform: uppercase;">
USER SECURITY FEATURES<br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" />DRAG/DROP AND FILE CREATIONS.<br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" />WEB SERVICES VIA API<br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" />EXPORT/IMPORT AND FILE ZIPPING<br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" />RESTRICTIVE MULTIPLE FILE UPDATING WITH THE HELP OF CHECK-IN/CHECK-OUT FEATURE<br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" />REPORTING IN THE FORM OF CHARTING, BARRING AND OTHER COMMON REPORTING DIAGRAMS.<br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" />MANY OTHERS.</h3>
<div>
<br /></div>
<div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; width: 850px;">
<tbody>
<tr style="height: 13.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #1F497D; border: solid windowtext 1.0pt; height: 13.0pt; mso-background-themecolor: text2; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 91.3pt;" valign="top" width="122"><div class="MsoNormal">
<b><span style="color: white;">Relevant AD<o:p></o:p></span></b></div>
</td>
<td style="background: yellow; border-left: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 398.75pt;" valign="top" width="532"><div class="MsoNormal">
<b><span style="color: #0f243e;">This ad may be
helpful, if relevant to your search.<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="height: 62.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; height: 62.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 490.05pt;" valign="top" width="653"><div class="MsoNormal">
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Add1 -->
<br />
<ins class="adsbygoogle" data-ad-client="ca-pub-0413634368644504" data-ad-slot="1876834640" style="display: inline-block; height: 90px; width: 728px;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</td>
</tr>
</tbody></table>
</div>
<div>
<br /></div>
<div>
<br /></div>
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>Open source CMS for Financial Clients</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Several Banks do prefer the open source content management system. Being open source they can also change the features available in the content management systems without a lot of financial burden. Some of the banks do prefer the following CMS.</div>
<h2 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>Alfresco</b></h2>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
It provides a lot of feature and most of the features are very rich in terms of their intended nature. It has java support which means if the Bank needs to change the functionality of the CMS itself; it can easily do that because most of the bank will have several java developers in their IT department.</div>
<h2 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>Logical Docs</b></span></h2>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
LogicalDOC is a document management system allowing a user to optimize its work by searching documents with help of keywords, parameters or content. It mainly provides following features. Check the link for more details. You can <a data-mce-href="http://www.logicaldoc.com/document-management-system-features.html" href="http://www.logicaldoc.com/document-management-system-features.html" style="color: #1b8be0; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: none;">check here </a>the more features.</div>
<h4 data-mce-style="text-align: justify;" style="clear: both; font-size: 14px; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<strong style="font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><i><u>Document Management</u></i></strong></h4>
<h6 style="clear: both; font-size: 14px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
Document delivery</h6>
<h6 style="clear: both; font-size: 14px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
Digital Signature<br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" />Book marking and version control<br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" />Other features.</h6>
<h6 style="clear: both; font-size: 14px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
</h6>
<h4 style="clear: both; font-size: 14px; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<strong style="font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><i><u>Document import/export</u></i></strong><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">Import from folders</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">Hot import and many more</span></h4>
<h6 style="clear: both; font-size: 14px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
</h6>
<h4 style="clear: both; font-size: 14px; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<strong style="font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><i><u>Collaboration</u></i></strong><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">Check-in and check-out</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">Discussion forums</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">Internal messaging systems</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">RSS and more</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"></strong></b></span></h4>
<h4 style="clear: both; font-size: 14px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><br /></strong></h4>
<h4 style="clear: both; font-size: 14px; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<strong style="font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><i><u>Administrative tasks</u></i></strong><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">Task Manager</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">Security, users and groups</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">Other administrative tasks.</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"></strong></b></span></h4>
<h6 style="clear: both; font-size: 14px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><br /></strong></h6>
<h6 style="clear: both; font-size: 14px; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<strong style="font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><i><u>Integration</u></i></strong><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">Mobile Phone apps (for android platform)</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">Microsoft Office Ad-in</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span class="Apple-style-span" style="font-style: inherit;">LDAP and active directory</span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"> </strong><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>Open KM</b></span><br style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;" /><span data-mce-style="color: #000080;" style="color: navy; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Will be updated soon.</span></h6>
<h4 style="clear: both; font-size: 14px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
</h4>
<h1 data-mce-style="text-align: justify;" style="clear: both; color: black; font-size: 15px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 0.8125em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;">
<b>Web Content Management Systems</b></h1>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
If a content management system is installed and accessed (both by admin and simple user) via web, then it is mainly called as “Web Content Management Systems”. In the current market Web CMS is highly popular due to the ease of scalability. In the financial domain, the two famous Web CMS product is <strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Livesite</strong> and <strong style="font-style: inherit; font-weight: bold; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;">Teamsite</strong>. Both of these CMS products is from Autonomy.</div>
<h3 data-mce-style="text-align: justify;" style="clear: both; font-size: 10px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: 0.1em; line-height: 2.6em; text-align: justify; text-transform: uppercase;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>LIVESITE</b></span></h3>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
If the content of a company changes frequently based on its context and selling features based on demand, then this CMS is the best suitable, if business wants the ability to directly make the changes and publish it on the CMS site.</div>
<h3 data-mce-style="text-align: justify;" style="clear: both; font-size: 10px; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: 0.1em; line-height: 2.6em; text-align: justify; text-transform: uppercase;">
<span style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625;"><b>TEAMSITE</b></span></h3>
<div data-mce-style="text-align: justify;" style="font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; margin-bottom: 1.625em; text-align: justify;">
Teamsite provides several corporate level functionalities. Some of the important features are content authoring, layout, site design, analytics, workflow based approval and many others. It provides automatic code, content and configuration deployment which hugely reduces the production implementation cost to the business. <a data-mce-href="http://promote.autonomy.com/components/pagenext.jsp?topic=PRODUCT::TEAMSITE" href="http://promote.autonomy.com/components/pagenext.jsp?topic=PRODUCT::TEAMSITE" style="color: #1b8be0; font-style: inherit; font: normal normal normal 15px/normal 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.625; text-decoration: none;">Check here </a>to know more details on teamsite content management systems.</div>
</div>
Unknownnoreply@blogger.com139tag:blogger.com,1999:blog-7382811498705583939.post-47553250428328783552011-09-14T13:23:00.000-04:002011-09-16T19:16:57.361-04:00Tips on writting authentic and informative posts.<strong>Post should be geneune</strong><br />
<div data-mce-style="text-align: justify;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em; text-align: justify;">
Every post should have some unique contents. The first aim of any post should be provide some informative data to its users. It's OK to have a post with one or two paragraph but must be solving the user demand. It's OK to have some extent of gossips (depending upon the nature of post) but the writer's thought process must be reflected in the post contents. Post must be authentic.<br />
<br />
<a name='more'></a></div>
<div data-mce-style="text-align: justify;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em; text-align: justify;">
<strong>Provide Consolidated or work of your own Creation</strong></div>
<div data-mce-style="text-align: justify;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em; text-align: justify;">
Visitors must believe, as they read on, that they are reading some thing that writer has written out of his mind or at least gathered the information from several sources which otherwise would have been difficult or time-consuming for the reader to get. Readers will come back to the same site only for such type of posts</div>
<div data-mce-style="text-align: justify;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em; text-align: justify;">
A post must have few paragraphs. Some important words matching to the theme of the post, must be repeated multiple times. Try not to repeat the exact word but use synonyms. The repetition must be logical in the sense which post demands. What does it mean that one should write a good amount of information on topic which will automatically repeat few words across the post.</div>
<h2 style="clear: both; color: black; font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0px 0px 0.81em;">
<strong>Posts must reach large set of Audiences</strong></h2>
<div data-mce-style="text-align: justify;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em; text-align: justify;">
Give at least two link in a post. Contents of a post should not be a direct or even logical copy post from either link. Everyone must follow this theory to create authenticity about the post in the reader's mind.</div>
<div data-mce-style="text-align: justify;" style="font-size-adjust: none; font-stretch: normal; font: 15px/1.625 "Helvetica Neue", Helvetica, Arial, sans-serif; margin-bottom: 1.62em; text-align: justify;">
This is absolutely required from search engine perspective. This will enable internet users to easily search our pages. Ultimately increasing hits to the website. Reading and writing authentic post on the internet is an art rather than a technical skills</div>
Unknownnoreply@blogger.com45