<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-6523603326694228986</atom:id><lastBuildDate>Fri, 30 Aug 2024 10:13:48 +0000</lastBuildDate><category>c program</category><category>android</category><category>c</category><category>java</category><category>Php</category><category>c++</category><category>ipl</category><category>ipl online streaming</category><category>variable</category><category>Applet Program in java</category><category>Batting and Bowling statistics</category><category>Byte</category><category>C program to evaluate the power series</category><category>C program to read last n chatacters of the file using appropriate file function</category><category>C progrsm</category><category>Calender in C++</category><category>Call By Value and Call By Reference</category><category>Class Constructor</category><category>Compare</category><category>Constructor</category><category>Constructor Overloading In java</category><category>Creating a thread by using Runnable Interface</category><category>Cricket 2014</category><category>Decimal to binary conversion in c</category><category>Destry()</category><category>Dynamic Memory Allocation</category><category>Factorial</category><category>Fibonacci series in c programming</category><category>Fibonacci series in c using for loop</category><category>Hello world in Php</category><category>Java constructor</category><category>Java program to convert Fahrenheit to Celsius</category><category>Jobs</category><category>Leaf Node In Binary Tree</category><category>Merge Sort in C</category><category>Operators in php.precedence operator</category><category>PHP is case sensitive</category><category>PHP is whitespace insensitive</category><category>Parameterized Constructor</category><category>Pascle triangle in java</category><category>Reverse string using StringBuffer class</category><category>Sample Student form using jsp</category><category>Script</category><category>Square root</category><category>String buffer java</category><category>Strings in Java</category><category>Swapping of two numbers in C using temporary variable</category><category>Write a program to count the number of words</category><category>apk</category><category>app</category><category>applet</category><category>arithmetic operator</category><category>awt</category><category>binary</category><category>binary search</category><category>binary tree</category><category>boolean</category><category>built in data types</category><category>capital to small</category><category>case sensitive</category><category>celsius to fahrenheit</category><category>characterdouble</category><category>class</category><category>comparison operator</category><category>conditional operator</category><category>conversion</category><category>copy contents of one file to another in c</category><category>creating a three thread by extending the Thread class</category><category>decimal</category><category>electric bill program</category><category>exception</category><category>for</category><category>for loop</category><category>function</category><category>init method</category><category>integer</category><category>interface</category><category>ipl 7</category><category>ipl watch online</category><category>java program</category><category>java program to reverse string</category><category>jsp</category><category>life cycle</category><category>lines and characters in a text.</category><category>logical operator</category><category>loop</category><category>negative number</category><category>object</category><category>pointer</category><category>positive number</category><category>prime number in c</category><category>prime numbers between two intervals</category><category>program to find the maximum and minimum of given numbers.</category><category>qrt()</category><category>recursion</category><category>reverse string</category><category>runnable interface</category><category>scope</category><category>servlet</category><category>sizeof()</category><category>smart app</category><category>stop()</category><category>storage</category><category>student form</category><category>swapping of variables</category><category>thread</category><category>thread in java</category><category>uppercase</category><category>web hosting</category><title>Technological Zone</title><description>All Computer Programming languages and its basics (C,C++,JAVA,PHP,SAP(ALL MODULES)</description><link>http://loadyoursystem.blogspot.com/</link><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><generator>Blogger</generator><openSearch:totalResults>95</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-6925289761993913263</guid><pubDate>Sun, 04 May 2014 09:56:00 +0000</pubDate><atom:updated>2014-05-04T02:56:05.996-07:00</atom:updated><title>Allocating Memory with malloc</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2&gt;
Allocating Memory with&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;&lt;/h2&gt;
[This section corresponds to parts of K&amp;amp;R Secs. 5.4, 5.6, 6.5, and 7.8.5]&lt;br /&gt;
A problem with many simple programs, including in particular little teaching programs such as we&#39;ve been writing so far, is that they tend to use fixed-size arrays which may or may not be big enough. We have an array of 100&amp;nbsp;&lt;tt&gt;int&lt;/tt&gt;s for the numbers which the user enters and wishes to find the average of--what if the user enters 101 numbers? We have an array of 100&amp;nbsp;&lt;tt&gt;char&lt;/tt&gt;s which we pass to&amp;nbsp;&lt;tt&gt;getline&lt;/tt&gt;&amp;nbsp;to receive the user&#39;s input--what if the user types a line of 200 characters? If we&#39;re lucky, the relevant parts of the program check how much of an array they&#39;ve used, and print an error message or otherwise gracefully abort before overflowing the array. If we&#39;re not so lucky, a program may sail off the end of an array, overwriting other data and behaving quite badly. In either case, the user doesn&#39;t get his job done. How can we avoid the restrictions of fixed-size arrays?&lt;br /&gt;
The answers all involve the standard library function&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;. Very simply,&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;&amp;nbsp;returns a pointer to&amp;nbsp;&lt;i&gt;n&lt;/i&gt;&amp;nbsp;bytes of memory which we can do anything we want to with. If we didn&#39;t want to read a line of input into a fixed-size array, we could use&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;, instead. Here&#39;s the first step:&lt;br /&gt;
&lt;pre&gt; #include &amp;lt;stdlib.h&amp;gt;

 char *line;
 int linelen = 100;
 line = malloc(linelen);
 /* incomplete -- malloc&#39;s return value not checked */
 getline(line, linelen);
&lt;/pre&gt;
&lt;tt&gt;malloc&lt;/tt&gt;&amp;nbsp;is declared in&amp;nbsp;&lt;tt&gt;&amp;lt;stdlib.h&amp;gt;&lt;/tt&gt;, so we&amp;nbsp;&lt;tt&gt;#include&lt;/tt&gt;&amp;nbsp;that header in any program that calls&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;. A ``byte&#39;&#39; in C is, by definition, an amount of storage suitable for storing one character, so the above invocation of&lt;tt&gt;malloc&lt;/tt&gt;&amp;nbsp;gives us exactly as many&amp;nbsp;&lt;tt&gt;char&lt;/tt&gt;s as we ask for. We could illustrate the resulting pointer like this:&lt;br /&gt;&lt;img src=&quot;http://www.eskimo.com/~scs/cclass/notes/fig11.1.gif&quot; /&gt;&lt;br /&gt;The 100 bytes of memory (not all of which are shown) pointed to by&amp;nbsp;&lt;tt&gt;line&lt;/tt&gt;&amp;nbsp;are those allocated by&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;. (They are brand-new memory, conceptually a bit different from the memory which the compiler arranges to have allocated automatically for our conventional variables. The 100 boxes in the figure don&#39;t have a name next to them, because they&#39;re not storage for a variable we&#39;ve declared.)&lt;br /&gt;
&lt;br /&gt;
As a second example, we might have occasion to allocate a piece of memory, and to copy a string into it with&amp;nbsp;&lt;tt&gt;strcpy&lt;/tt&gt;:&lt;br /&gt;
&lt;pre&gt; char *p = malloc(15);
 /* incomplete -- malloc&#39;s return value not checked */
 strcpy(p, &quot;Hello, world!&quot;);
&lt;/pre&gt;
&lt;br /&gt;
When copying strings, remember that all strings have a terminating&amp;nbsp;&lt;tt&gt;\0&lt;/tt&gt;&amp;nbsp;character. If you use&amp;nbsp;&lt;tt&gt;strlen&lt;/tt&gt;&amp;nbsp;to count the characters in a string for you, that count will&amp;nbsp;&lt;em&gt;not&lt;/em&gt;&amp;nbsp;include the trailing&amp;nbsp;&lt;tt&gt;\0&lt;/tt&gt;, so you must add one before calling&lt;tt&gt;malloc&lt;/tt&gt;:&lt;br /&gt;
&lt;pre&gt; char *somestring, *copy;
 ...
 copy = malloc(strlen(somestring) + 1);  /* +1 for \0 */
 /* incomplete -- malloc&#39;s return value not checked */
 strcpy(copy, somestring);
&lt;/pre&gt;
&lt;br /&gt;
What if we&#39;re not allocating characters, but integers? If we want to allocate 100&amp;nbsp;&lt;tt&gt;int&lt;/tt&gt;s, how many bytes is that? If we know how big&amp;nbsp;&lt;tt&gt;int&lt;/tt&gt;s are on our machine (i.e. depending on whether we&#39;re using a 16- or 32-bit machine) we could try to compute it ourselves, but it&#39;s much safer and more portable to let C compute it for us. C has a&amp;nbsp;&lt;tt&gt;sizeof&lt;/tt&gt;&amp;nbsp;operator, which computes the size, in bytes, of a variable or type. It&#39;s just what we need when calling&lt;tt&gt;malloc&lt;/tt&gt;. To allocate space for 100&amp;nbsp;&lt;tt&gt;int&lt;/tt&gt;s, we could call&lt;br /&gt;
&lt;pre&gt; int *ip = malloc(100 * sizeof(int));
&lt;/pre&gt;
The use of the&amp;nbsp;&lt;tt&gt;sizeof&lt;/tt&gt;&amp;nbsp;operator tends to look like a function call, but it&#39;s really an operator, and it does its work at compile time.&lt;br /&gt;
&lt;br /&gt;
Since we can use array indexing syntax on pointers, we can treat a pointer variable after a call to&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;&amp;nbsp;almost exactly as if it were an array. In particular, after the above call to&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;&amp;nbsp;initializes&amp;nbsp;&lt;tt&gt;ip&lt;/tt&gt;&amp;nbsp;to point at storage for 100&amp;nbsp;&lt;tt&gt;int&lt;/tt&gt;s, we can access&amp;nbsp;&lt;tt&gt;ip[0]&lt;/tt&gt;,&amp;nbsp;&lt;tt&gt;ip[1]&lt;/tt&gt;, ... up to&amp;nbsp;&lt;tt&gt;ip[99]&lt;/tt&gt;. This way, we can get the effect of an array even if we don&#39;t know until run time how big the ``array&#39;&#39; should be. (In a later section we&#39;ll see how we might deal with the case where we&#39;re not even sure at the point we begin using it how big an ``array&#39;&#39; will eventually have to be.)&lt;br /&gt;
Our examples so far have all had a significant omission: they have not checked&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;&#39;s return value. Obviously, no real computer has an infinite amount of memory available, so there is no guarantee that&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;&amp;nbsp;will be able to give us as much memory as we ask for. If we call&amp;nbsp;&lt;tt&gt;malloc(100000000)&lt;/tt&gt;, or if we call&amp;nbsp;&lt;tt&gt;malloc(10)&lt;/tt&gt;&amp;nbsp;10,000,000 times, we&#39;re probably going to run out of memory.&lt;br /&gt;
When&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;&amp;nbsp;is unable to allocate the requested memory, it returns a&amp;nbsp;&lt;dfn&gt;null pointer&lt;/dfn&gt;. A null pointer, remember, points definitively nowhere. It&#39;s a ``not a pointer&#39;&#39; marker; it&#39;s not a pointer you can use. (As we said in section 9.4, a null pointer can be used as a failure return from a function that returns pointers, and&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;&amp;nbsp;is a perfect example.) Therefore, whenever you call&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;, it&#39;s vital to check the returned pointer before using it! If you call&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;, and it returns a null pointer, and you go off and use that null pointer as if it pointed somewhere, your program probably won&#39;t last long. Instead, a program should immediately check for a null pointer, and if it receives one, it should at the very least print an error message and exit, or perhaps figure out some way of proceeding without the memory it asked for. But it cannot go on to use the null pointer it got back from&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;&amp;nbsp;in any way, because that null pointer by definition points nowhere. (``It cannot use a null pointer in any way&#39;&#39; means that the program cannot use the&amp;nbsp;&lt;tt&gt;*&lt;/tt&gt;&amp;nbsp;or&amp;nbsp;&lt;tt&gt;[]&lt;/tt&gt;&amp;nbsp;operators on such a pointer value, or pass it to any function that expects a valid pointer.)&lt;br /&gt;
A call to&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;, with an error check, typically looks something like this:&lt;br /&gt;
&lt;pre&gt; int *ip = malloc(100 * sizeof(int));
 if(ip == NULL)
  {
  printf(&quot;out of memory\n&quot;);
  &lt;i&gt;exit or return&lt;/i&gt;
  }
&lt;/pre&gt;
After printing the error message, this code should return to its caller, or exit from the program entirely; it cannot proceed with the code that would have used&amp;nbsp;&lt;tt&gt;ip&lt;/tt&gt;.&lt;br /&gt;
&lt;br /&gt;
Of course, in our examples so far, we&#39;ve still limited ourselves to ``fixed size&#39;&#39; regions of memory, because we&#39;ve been calling&amp;nbsp;&lt;tt&gt;malloc&lt;/tt&gt;&amp;nbsp;with fixed arguments like 10 or 100. (Our call to&amp;nbsp;&lt;tt&gt;getline&lt;/tt&gt;&amp;nbsp;is still limited to 100-character lines, or whatever number we set the&amp;nbsp;&lt;tt&gt;linelen&lt;/tt&gt;&amp;nbsp;variable to; our&amp;nbsp;&lt;tt&gt;ip&lt;/tt&gt;&amp;nbsp;variable still points at only 100&amp;nbsp;&lt;tt&gt;int&lt;/tt&gt;s.) However, since the sizes are now values which can in principle be determined at run-time, we&#39;ve at least moved beyond having to recompile the program (with a bigger array) to accommodate longer lines, and with a little more work, we could arrange that the ``arrays&#39;&#39; automatically grew to be as large as required. (For example, we could write something like&amp;nbsp;&lt;tt&gt;getline&lt;/tt&gt;&amp;nbsp;which could read the longest input line actually seen.) We&#39;ll begin to explore this possibility in a later section.&lt;br /&gt;
&lt;hr /&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/05/allocating-memory-with-malloc.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-5865188924773046562</guid><pubDate>Sun, 04 May 2014 09:36:00 +0000</pubDate><atom:updated>2014-05-04T02:36:56.840-07:00</atom:updated><title></title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h1&gt;
Reading the Command Line&lt;/h1&gt;
&lt;br /&gt;
We&#39;ve mentioned several times that a program is rarely useful if it does exactly the same thing every time you run it. Another way of giving a program some variable input to work on is by invoking it with&amp;nbsp;&lt;dfn&gt;command line arguments&lt;/dfn&gt;.&lt;br /&gt;
(We should probably admit that command line user interfaces are a bit old-fashioned, and currently somewhat out of favor. If you&#39;ve used Unix or MS-DOS, you know what a command line is, but if your experience is confined to the Macintosh or Microsoft Windows or some other Graphical User Interface, you may never have seen a command line. In fact, if you&#39;re learning C on a Mac or under Windows, it can be tricky to give your program a command line at all. Think C for the Macintosh provides a way; I&#39;m not sure about other compilers. If your compilation environment doesn&#39;t provide an easy way of simulating an old-fashioned command line, you may skip this chapter.)&lt;br /&gt;
C&#39;s model of the command line is that it consists of a sequence of words, typically separated by whitespace. Your main program can receive these words as an array of strings, one word per string. In fact, the C run-time startup code is always willing to pass you this array, and all you have to do to receive it is to declare&amp;nbsp;&lt;tt&gt;main&lt;/tt&gt;&amp;nbsp;as accepting two parameters, like this:&lt;br /&gt;
&lt;pre&gt; int main(int argc, char *argv[])
 {
 ...
 }
&lt;/pre&gt;
When&amp;nbsp;&lt;tt&gt;main&lt;/tt&gt;&amp;nbsp;is called,&amp;nbsp;&lt;tt&gt;argc&lt;/tt&gt;&amp;nbsp;will be a count of the number of command-line arguments, and&amp;nbsp;&lt;tt&gt;argv&lt;/tt&gt;&amp;nbsp;will be an array (``vector&#39;&#39;) of the arguments themselves. Since each word is a string which is represented as a pointer-to-&lt;tt&gt;char&lt;/tt&gt;,&amp;nbsp;&lt;tt&gt;argv&lt;/tt&gt;&amp;nbsp;is an array-of-pointers-to-&lt;tt&gt;char&lt;/tt&gt;. Since we are not&amp;nbsp;&lt;dfn&gt;defining&lt;/dfn&gt;&amp;nbsp;the&amp;nbsp;&lt;tt&gt;argv&lt;/tt&gt;&amp;nbsp;array, but merely declaring a parameter which references an array somewhere else (namely, in&amp;nbsp;&lt;tt&gt;main&lt;/tt&gt;&#39;s caller, the run-time startup code), we do not have to supply an array dimension for&amp;nbsp;&lt;tt&gt;argv&lt;/tt&gt;. (Actually, since functions never receive arrays as parameters in C,&amp;nbsp;&lt;tt&gt;argv&lt;/tt&gt;&amp;nbsp;can also be thought of as a pointer-to-pointer-to-&lt;tt&gt;char&lt;/tt&gt;, or&amp;nbsp;&lt;tt&gt;char **&lt;/tt&gt;. But multidimensional arrays and pointers to pointers can be confusing, and we haven&#39;t covered them, so we&#39;ll talk about&amp;nbsp;&lt;tt&gt;argv&lt;/tt&gt;&amp;nbsp;as if it were an array.) (Also, there&#39;s nothing magic about the names&amp;nbsp;&lt;tt&gt;argc&lt;/tt&gt;&amp;nbsp;and&amp;nbsp;&lt;tt&gt;argv&lt;/tt&gt;. You can give&amp;nbsp;&lt;tt&gt;main&lt;/tt&gt;&#39;s two parameters any names you like, as long as they have the appropriate types. The names&amp;nbsp;&lt;tt&gt;argc&lt;/tt&gt;&amp;nbsp;and&amp;nbsp;&lt;tt&gt;argv&lt;/tt&gt;&amp;nbsp;are traditional.)&lt;br /&gt;
&lt;br /&gt;
The first program to write when playing with&amp;nbsp;&lt;tt&gt;argc&lt;/tt&gt;&amp;nbsp;and&amp;nbsp;&lt;tt&gt;argv&lt;/tt&gt;&amp;nbsp;is one which simply prints its arguments:&lt;br /&gt;
&lt;pre&gt;#include &amp;lt;stdio.h&amp;gt;

main(int argc, char *argv[])
{
int i;

for(i = 0; i &amp;lt; argc; i++)
 printf(&quot;arg %d: %s\n&quot;, i, argv[i]);
return 0;
}
&lt;/pre&gt;
(This program is essentially the Unix or MS-DOS&amp;nbsp;&lt;tt&gt;echo&lt;/tt&gt;&amp;nbsp;command.)&lt;br /&gt;
&lt;br /&gt;
If you run this program, you&#39;ll discover that the set of ``words&#39;&#39; making up the command line includes the command you typed to invoke your program (that is, the name of your program). In other words,&amp;nbsp;&lt;tt&gt;argv[0]&lt;/tt&gt;&amp;nbsp;typically points to the name of your program, and&amp;nbsp;&lt;tt&gt;argv[1]&lt;/tt&gt;&amp;nbsp;is the first argument.&lt;br /&gt;
There are no hard-and-fast rules for how a program should interpret its command line. There is one set of conventions for Unix, another for MS-DOS, another for VMS. Typically you&#39;ll loop over the arguments, perhaps treating some as option flags and others as actual arguments (input files, etc.), interpreting or acting on each one. Since each argument is a string, you&#39;ll have to use&amp;nbsp;&lt;tt&gt;strcmp&lt;/tt&gt;&amp;nbsp;or the like to match arguments against any patterns you might be looking for. Remember that&amp;nbsp;&lt;tt&gt;argc&lt;/tt&gt;&amp;nbsp;contains the number of words on the command line, and that&amp;nbsp;&lt;tt&gt;argv[0]&lt;/tt&gt;&amp;nbsp;is the command name, so if&amp;nbsp;&lt;tt&gt;argc&lt;/tt&gt;&amp;nbsp;is 1, there are no arguments to inspect. (You&#39;ll never want to look at&lt;tt&gt;argv[i]&lt;/tt&gt;, for&amp;nbsp;&lt;tt&gt;i &amp;gt;= argc&lt;/tt&gt;, because it will be a null or invalid pointer.)&lt;br /&gt;
As another example, also illustrating&amp;nbsp;&lt;tt&gt;fopen&lt;/tt&gt;&amp;nbsp;and the file I/O techniques of the previous chapter, here is a program which copies one or more input files to its standard output. Since ``standard output&#39;&#39; is usually the screen by default, this is therefore a useful program for displaying files. (It&#39;s analogous to the obscurely-named Unix&amp;nbsp;&lt;tt&gt;cat&lt;/tt&gt;&amp;nbsp;command, and to the MS-DOS&amp;nbsp;&lt;tt&gt;type&lt;/tt&gt;&amp;nbsp;command.) You might also want to compare this program to the character-copying program of section 6.2.&lt;br /&gt;
&lt;pre&gt;#include &amp;lt;stdio.h&amp;gt;

main(int argc, char *argv[])
{
int i;
FILE *fp;
int c;

for(i = 1; i &amp;lt; argc; i++)
 {
 fp = fopen(argv[i], &quot;r&quot;);
 if(fp == NULL)
  {
  fprintf(stderr, &quot;cat: can&#39;t open %s\n&quot;, argv[i]);
  continue;
  }

 while((c = getc(fp)) != EOF)
  putchar(c);

 fclose(fp);
 }

return 0;
}
&lt;/pre&gt;
As a historical note, the Unix&amp;nbsp;&lt;tt&gt;cat&lt;/tt&gt;&amp;nbsp;program is so named because it can be used to con&lt;b&gt;cat&lt;/b&gt;enate two files together, like this:&lt;br /&gt;
&lt;pre&gt; cat a b &amp;gt; c
&lt;/pre&gt;
This illustrates why it&#39;s a good idea to print error messages to&amp;nbsp;&lt;tt&gt;stderr&lt;/tt&gt;, so that they don&#39;t get redirected. The ``can&#39;t open file&#39;&#39; message in this example also includes the name of the program as well as the name of the file.&lt;br /&gt;
&lt;br /&gt;
Yet another piece of information which it&#39;s usually appropriate to include in error messages is the reason why the operation failed, if known. For operating system problems, such as inability to open a file, a code indicating the error is often stored in the global variable&amp;nbsp;&lt;tt&gt;errno&lt;/tt&gt;. The standard library function&amp;nbsp;&lt;tt&gt;strerror&lt;/tt&gt;&amp;nbsp;will convert an&amp;nbsp;&lt;tt&gt;errno&lt;/tt&gt;&amp;nbsp;value to a human-readable error message string. Therefore, an even more informative error message printout would be&lt;br /&gt;
&lt;pre&gt; fp = fopen(argv[i], &quot;r&quot;);
 if(fp == NULL)
  fprintf(stderr, &quot;cat: can&#39;t open %s: %s\n&quot;,
    argv[i], strerror(errno));
&lt;/pre&gt;
If you use code like this, you can&amp;nbsp;&lt;tt&gt;#include &amp;lt;errno.h&amp;gt;&lt;/tt&gt;&amp;nbsp;to get the declaration for&amp;nbsp;&lt;tt&gt;errno&lt;/tt&gt;, and&amp;nbsp;&lt;tt&gt;&amp;lt;string.h&amp;gt;&lt;/tt&gt;&amp;nbsp;to get the declaration for&amp;nbsp;&lt;tt&gt;strerror()&lt;/tt&gt;.&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/05/reading-command-line-weve-mentioned.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-447795679950071939</guid><pubDate>Sat, 03 May 2014 06:12:00 +0000</pubDate><atom:updated>2014-05-02T23:12:52.923-07:00</atom:updated><title>Point 3D Java</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;class Point3d extends Point2d {
 private double z;

 public Point3d( int px, int py, int pz) {
    super (px, py);

    z = pz;
   }

 public Point3d () {
    super ();
    z = 0;

    // perhaps a better method would be to replace the above code with
    //     this (0, 0, 0);
   }

 public Point3d(Point3d pt) {
    super ((Point2d) pt);
    z = pt.getZ();

    // perhaps a better method would be to replace the above code with
    //     this (pt.getX(), pt.getY(), pt.getZ());
   }

 public void setZ(double pz) {
    dprint(&quot;setZ(): Changing value of z from &quot; + z + &quot; to &quot; + pz);
    z = pz;
   }

 public double getZ () {
    return z;
   }

 public void setXYZ(double px, double py, double pz) {
    setXY(px, py);
    setZ(pz);
   }

 public double distanceFrom (Point3d pt) {
    double xyDistance = super.distanceFrom ((Point2d) pt);
    double dz = Math.abs (z - pt.getZ()); 
    dprint (&quot;distanceFrom(): deltaZ = &quot; + dz);

    return Math.sqrt((xyDistance * xyDistance) + (dz * dz));
   }

 public double distanceFromOrigin () {
    return distanceFrom (new Point3d ( ));
   }

 public String toStringForZ() {
    String str =  &quot;, &quot; + z;
    return str;
   }

 public String toString() {
    String str = toStringForXY() + toStringForZ() + &quot;)&quot;;
    return str;
   }

 
 public static void main (String[] args) {
    Point3d pt1 = new Point3d ();
    System.out.println (&quot;pt1 = &quot; + pt1);

    Point3d pt2 = new Point3d (1,2,3);
    System.out.println (&quot;pt2 = &quot; + pt2);

    pt1.setDebug(true);  // turn on debugging statements
    // for pt1
    System.out.println (&quot;Distance from &quot; + pt2 + &quot; to &quot; + pt1 +
   &quot; is &quot; + pt2.distanceFrom(pt1));

    System.out.println (&quot;Distance from &quot; + pt1 + &quot; to the origin (0, 0) is &quot; +
   pt1.distanceFromOrigin());

    System.out.println (&quot;Distance from &quot; + pt2 + &quot; to the origin (0, 0) is &quot; +
   pt2.distanceFromOrigin());

    pt1.setXYZ(3, 5, 7);
    System.out.println (&quot;pt1 = &quot; + pt1);

    pt2.setXYZ(-3, -5, -7);
    System.out.println (&quot;pt2 = &quot; + pt2);

    System.out.println (&quot;Distance from &quot; + pt1 + &quot; to &quot; + pt2 +
   &quot; is &quot; + pt1.distanceFrom(pt2));

    System.out.println (&quot;Distance from &quot; + pt2 + &quot; to &quot; + pt1 +
   &quot; is &quot; + pt2.distanceFrom(pt1));

    pt1.setDebug(false);    // turning off debugging 
       // statements for pt1

    System.out.println (&quot;Distance from &quot; + pt1 + &quot; to the origin (0, 0) is &quot; +
   pt1.distanceFromOrigin());

    System.out.println (&quot;Distance from &quot; + pt2 + &quot; to the origin (0, 0) is &quot; +
   pt2.distanceFromOrigin());


   }
}&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/05/point-3d-java.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-8867123762938732364</guid><pubDate>Sat, 03 May 2014 06:11:00 +0000</pubDate><atom:updated>2014-05-02T23:11:54.919-07:00</atom:updated><title>Divide By Zero Exception in Java</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;import java.io.*;

// This program shows a stack track that occurs when java
// encounters a terminal error when running a program.

public class DivBy0
{

 public static void funct1 ()
 {
  System.out.println (&quot;Inside funct1()&quot;);

  funct2();
 }

 public static void main (String[] args)
 {
  int val;

  System.out.println (&quot;Inside main()&quot;);

  funct1();

 }

 public static void funct2 ()
 {
  System.out.println (&quot;Inside funct2()&quot;);
  int i, j, k;

  i = 10;
  j = 0;

  k = i/j;
 }

}&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/05/divide-by-zero-exception-in-java.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-586520799525025607</guid><pubDate>Sat, 03 May 2014 06:11:00 +0000</pubDate><atom:updated>2014-05-02T23:11:00.859-07:00</atom:updated><title>My File Reader </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;import java.io.*;
import java.util.*;

public class MyFileReader
{

 public static void main (String[] args) throws java.io.IOException
 {

  String s1;
  String s2;

  // set up the buffered reader to read from the keyboard
  BufferedReader br = new BufferedReader (new FileReader (&quot;MyFileReader.txt&quot;));

  s1 = br.readLine();

  System.out.println (&quot;The line is &quot; + s1);
  System.out.println (&quot;The line has &quot; + s1.length() + &quot; characters&quot;);

  System.out.println ();
  System.out.println (&quot;Breaking the line into tokens we get:&quot;);

  int numTokens = 0;
  StringTokenizer st = new StringTokenizer (s1);

  while (st.hasMoreTokens())
     {
      s2 = st.nextToken();
      numTokens++;
      System.out.println (&quot;    Token &quot; + numTokens + &quot; is: &quot; + s2);
     }
 }
}&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/05/my-file-reader.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-895168995387552952</guid><pubDate>Sat, 03 May 2014 06:10:00 +0000</pubDate><atom:updated>2014-05-02T23:10:29.903-07:00</atom:updated><title>Keyboard Reader Java</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;import java.io.*;
import java.util.*;

public class KeyboardReader
{

 public static void main (String[] args) throws java.io.IOException
 {

  String s1;
  String s2;

  double num1, num2, product;

  // set up the buffered reader to read from the keyboard
  BufferedReader br = new BufferedReader (new InputStreamReader (
   System.in));

  System.out.println (&quot;Enter a line of input&quot;);

  s1 = br.readLine();

  System.out.println (&quot;The line has &quot; + s1.length() + &quot; characters&quot;);

  System.out.println ();
  System.out.println (&quot;Breaking the line into tokens we get:&quot;);

  int numTokens = 0;
  StringTokenizer st = new StringTokenizer (s1);

  while (st.hasMoreTokens())
     {
      s2 = st.nextToken();
      numTokens++;
      System.out.println (&quot;    Token &quot; + numTokens + &quot; is: &quot; + s2);
     }
 }
}&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/05/keyboard-reader-java.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-167797012500631848</guid><pubDate>Wed, 23 Apr 2014 05:11:00 +0000</pubDate><atom:updated>2014-04-22T22:11:59.739-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Dynamic Memory Allocation</category><title>C Program to Find Largest Number Using  Dynamic Memory Allocation</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Dynamic Memory Allocation&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;In this program, &lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;calloc() function&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; is used to allocate the memory dynamically. Depending upon the number of elements, the required size is allocated which prevents the wastage of memory. If no memory is allocated, error is displayed and the program is terminated.&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Source Code to Find Largest Element Using Dynamic Memory Allocation&lt;br /&gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;int main(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int i,n;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; float *data;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;Enter total number of elements(1 to 100): &quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf(&quot;%d&quot;,&amp;amp;n);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data=(float*)calloc(n,sizeof(float));&amp;nbsp; /* Allocates the memory for &#39;n&#39; elements */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(data==NULL)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;Error!!! memory not allocated.&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(0);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;\n&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0;i&amp;lt;n;++i)&amp;nbsp; /* Stores number entered by user. */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;Enter Number %d: &quot;,i+1);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf(&quot;%f&quot;,data+i);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=1;i&amp;lt;n;++i)&amp;nbsp; /* Loop to store largest number at address data */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(*data&amp;lt;*(data+i)) /* Change &amp;lt; to &amp;gt; if you want to find smallest number */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *data=*(data+i);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;Largest element = %.2f&quot;,*data);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Output&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt=&quot;Largest element of an array output&quot; src=&quot;http://www.programiz.com/sites/tutorial2program/files/largest-element-array.jpg&quot; /&gt;&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/c-program-to-find-largest-number-using.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-1279353083597961885</guid><pubDate>Wed, 23 Apr 2014 05:03:00 +0000</pubDate><atom:updated>2014-04-22T22:03:57.251-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Byte</category><category domain="http://www.blogger.com/atom/ns#">c program</category><category domain="http://www.blogger.com/atom/ns#">sizeof()</category><title>C Program to Find Size of int, float, double and char of Your System</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://c%20program%20to%20find%20size%20of/&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;C Program to Find Size of Data Types:&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;The size of a character is always 1 byte but, size of int, float and double variables differs from system to system. This program will compute the size of int, float, double and char of you system using sizeof operator. The syntax of size of operator is:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;temp = sizeof(operand);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/* Here, temp is a variable of type integer,i.e, sizeof() operator&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;returns integer value. */&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Source Code&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/* This program computes the size of variable using sizeof operator.*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;int main(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; int a;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; float b;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; double c;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; char d;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; printf(&quot;Size of int: %d bytes\n&quot;,sizeof(a));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; printf(&quot;Size of float: %d bytes\n&quot;,sizeof(b));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; printf(&quot;Size of double: %d bytes\n&quot;,sizeof(c));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; printf(&quot;Size of char: %d byte\n&quot;,sizeof(d));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Output&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Size of int: 4 bytes&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Size of float: 4 bytes&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Size of double: 8 bytes&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Size of char: 1 byte&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Note: You may get different output depending upon your system.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Explanation&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;In this program, 4 variables a, b, c and d are declared of type int, float, double and char respectively. Then, the size of these variables is computed using sizeof operator and displayed.&lt;/span&gt;&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/c-program-to-find-size-of-int-float.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-270710991111879866</guid><pubDate>Thu, 17 Apr 2014 05:39:00 +0000</pubDate><atom:updated>2014-04-16T22:39:47.316-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Compare</category><category domain="http://www.blogger.com/atom/ns#">Strings in Java</category><title>Compare Strings in Java</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Following example compares two strings by using &lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;st.compareTo (string)&lt;/a&gt; ,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot; rel=&quot;&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;str.compareToIgnoreCase(String)&lt;/b&gt;&lt;/a&gt;&lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot; target=&quot;_blank&quot;&gt; &lt;/a&gt;and&lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt; str.compareTo(object string)&lt;/a&gt; of string&lt;br /&gt;class and returns the ascii difference of first odd characters of compared &lt;br /&gt;strings . &lt;br /&gt;
&lt;br /&gt;
public class&lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt; StringCompareEmp&lt;/a&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; public static void main(String args[]){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String str = &quot;Hello World&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String anotherString = &quot;hello world&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object objStr = str;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;System.out.println( str.compareTo(anotherString) ); &lt;/a&gt;&lt;br /&gt;
&amp;nbsp;System.out.println( str.compareToIgnoreCase(anotherString) );&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp; System.out.println( str.compareTo(objStr.toString()));&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/compare-strings-in-java.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-1505135981235470514</guid><pubDate>Thu, 17 Apr 2014 05:31:00 +0000</pubDate><atom:updated>2014-04-16T22:31:24.320-07:00</atom:updated><title></title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://loadyoursystem.blogspot.in/p/ipl.html&quot; rel=&quot;nofollow&quot;&gt;Watch IPL Live Streaming Here....&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMIVGCy5THwlXlAy-inJDidujMQoKIur6SA8V1sXsUBH-bOR5x2RsNuyyPekQ9lKB4K_OlyIVRmhofs6KNDImSu3ZHfxSkjpxxeq5YR2iS5GPiAugwJx73nGkJ5q9U_097gtTPSCnQBEo/s1600/ipl.jpg&quot; height=&quot;236&quot; width=&quot;400&quot; /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span id=&quot;goog_1347465981&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1347465982&quot;&gt;&lt;/span&gt;&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/watch-ipl-live-streaming-here.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMIVGCy5THwlXlAy-inJDidujMQoKIur6SA8V1sXsUBH-bOR5x2RsNuyyPekQ9lKB4K_OlyIVRmhofs6KNDImSu3ZHfxSkjpxxeq5YR2iS5GPiAugwJx73nGkJ5q9U_097gtTPSCnQBEo/s72-c/ipl.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-4332333088114519405</guid><pubDate>Thu, 17 Apr 2014 05:07:00 +0000</pubDate><atom:updated>2014-04-16T22:21:53.535-07:00</atom:updated><title>How do I present data in AVL grid in ABAP?  If I have a list of table results from a SQL query, how do I show this data in AVL? </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;br /&gt;To display &lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot;&gt;ALV LISTS&lt;/a&gt; the function module used are :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot;&gt;REUSE_ALV_LIST_DISPLAY&lt;/a&gt; &quot;For Normal LIST&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot;&gt;REUSE_ALV_HIERARCHICAL_LIST_DISPLAY&lt;/a&gt; &quot;For Hierarchical LIST&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; To display &lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot;&gt;ALV GRID&lt;/a&gt; the function module used are :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot;&gt;REUSE_ALV_GRID_DISPLAY &lt;/a&gt;. &quot;For GRID display&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; The most important component of the ALV is the &lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot;&gt;FIELDCATALOG &lt;/a&gt;which is of&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;a href=&quot;http://www.jdoqocy.com/click-7500628-8151382&quot;&gt;TYPE SLIS_T_FIEDLCAT_ALV&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/how-do-i-present-data-in-avl-grid-in.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-58768637223766419</guid><pubDate>Tue, 15 Apr 2014 13:29:00 +0000</pubDate><atom:updated>2014-04-15T06:29:12.225-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">c program</category><category domain="http://www.blogger.com/atom/ns#">negative number</category><category domain="http://www.blogger.com/atom/ns#">positive number</category><title>Check the number positive or negative</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;com&quot;&gt;#include&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; num&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    printf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;Enter a number: &quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    scanf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;%f&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&amp;amp;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
          printf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;You entered zero.&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
          printf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;%.2f is negative.&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
      printf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;%.2f is positive.&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/check-number-positive-or-negative.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-5607137337465596532</guid><pubDate>Tue, 15 Apr 2014 09:29:00 +0000</pubDate><atom:updated>2014-04-15T02:29:49.888-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ipl online streaming</category><title>One Days To Go .. Yess You can Watch IPL Online For Free Live Streaming</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSSaMraY_ffimut3pF6pwyHoJbkBKcV2j2g9WE6WbmmrUEHYqRpf3jnIRq9g3tNJHzc7XS6xMiu3qmmvo-fL5peu1SNWocOfQuD7AX_QCFf1o_LrAsqI8FRV-AUY0DoPuXej7ZM9BO1jnC/s1600/ipl.jpg&quot; height=&quot;236&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;h2 class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;a href=&quot;http://www.loadyoursystem.blogspot.in/p/ipl.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;IPL LIVE STREAMING&lt;/a&gt;&lt;/b&gt;&lt;/h2&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/one-days-to-go-yess-you-can-watch-ipl.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSSaMraY_ffimut3pF6pwyHoJbkBKcV2j2g9WE6WbmmrUEHYqRpf3jnIRq9g3tNJHzc7XS6xMiu3qmmvo-fL5peu1SNWocOfQuD7AX_QCFf1o_LrAsqI8FRV-AUY0DoPuXej7ZM9BO1jnC/s72-c/ipl.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-8533915550052038869</guid><pubDate>Tue, 15 Apr 2014 09:26:00 +0000</pubDate><atom:updated>2014-04-15T02:26:49.188-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">qrt()</category><category domain="http://www.blogger.com/atom/ns#">Square root</category><title>Compute Square root Using Newtons Method</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;#include &amp;lt;iostream.h&amp;gt;
#include &amp;lt;math.h&amp;gt;

float asqrt (float x, float precision) {
  float guess;

  guess = 1.0;
  while (fabs(guess*guess-x) &amp;gt;= precision) {
    guess = 0.5 * (guess + (x / guess));
  }
  return (guess);
}

int main () {
  float x, precision; 
  cout &amp;lt;&amp;lt; &quot;Enter a real number and the precision: &quot;;
  cin &amp;gt;&amp;gt; x &amp;gt;&amp;gt; precision;
  cout &amp;lt;&amp;lt; &quot;sqrt(&quot; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &quot;) is almost &quot; &amp;lt;&amp;lt; asqrt(x,precision) &amp;lt;&amp;lt; endl;
  return(0);
}&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/compute-square-root-using-newtons-method.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-5565586665564780313</guid><pubDate>Tue, 15 Apr 2014 09:25:00 +0000</pubDate><atom:updated>2014-04-15T02:25:40.782-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Call By Value and Call By Reference</category><title>Call By Valuse and Call By reference</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;#include &amp;lt;iostream.h&amp;gt;

int f1 (int, int, int);
int f2 (int&amp;amp;, int&amp;amp;, int&amp;amp;);
int f3 (int, int&amp;amp;, int);

void main () {
  int i, j, k;

  i=1;
  j=2;
  k=3;

  cout &amp;lt;&amp;lt; endl;
  cout &amp;lt;&amp;lt; &quot;Initial values of i, j, and k are: &quot; 
    &amp;lt;&amp;lt; i &amp;lt;&amp;lt; &quot;, &quot; &amp;lt;&amp;lt; j &amp;lt;&amp;lt; &quot;, and &quot; &amp;lt;&amp;lt; k &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;
  cout &amp;lt;&amp;lt; &quot;f1(i,j,k) = &quot; &amp;lt;&amp;lt; f1(i,j,k) &amp;lt;&amp;lt; endl;
  cout &amp;lt;&amp;lt; &quot;Values of i, j, and k after the call to f1 are: &quot; 
    &amp;lt;&amp;lt; i &amp;lt;&amp;lt; &quot;, &quot; &amp;lt;&amp;lt; j &amp;lt;&amp;lt; &quot;, and &quot; &amp;lt;&amp;lt; k &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;
  cout &amp;lt;&amp;lt; &quot;f2(i,j,k) = &quot; &amp;lt;&amp;lt; f2(i,j,k) &amp;lt;&amp;lt; endl;
  cout &amp;lt;&amp;lt; &quot;Values of i, j, and k after the call to f2 are: &quot; 
    &amp;lt;&amp;lt; i &amp;lt;&amp;lt; &quot;, &quot; &amp;lt;&amp;lt; j &amp;lt;&amp;lt; &quot;, and &quot; &amp;lt;&amp;lt; k &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;
  cout &amp;lt;&amp;lt; &quot;f3(i,j,k) = &quot; &amp;lt;&amp;lt; f3(i,j,k) &amp;lt;&amp;lt; endl;
  cout &amp;lt;&amp;lt; &quot;Values of i, j, and k after the call to f3 are: &quot; 
    &amp;lt;&amp;lt; i &amp;lt;&amp;lt; &quot;, &quot; &amp;lt;&amp;lt; j &amp;lt;&amp;lt; &quot;, and &quot; &amp;lt;&amp;lt; k &amp;lt;&amp;lt; endl;
}

int f1 (int x, int y, int z) {
  x=x+5;
  y=y+5;
  z=z+5;
  return(x+y+z);
}

int f2 (int&amp;amp; x, int&amp;amp; y, int&amp;amp; z) {
  x=x+5;
  y=y+5;
  z=z+5;
  return(x+y+z);
}

int f3 (int x, int&amp;amp; y, int z) {
  x=x+5;
  y=y+5;
  z=z+5;
  return(x+y+z);
}
&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/call-by-valuse-and-call-by-reference.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-7388683156897182793</guid><pubDate>Tue, 15 Apr 2014 09:24:00 +0000</pubDate><atom:updated>2014-04-15T02:24:00.406-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Calender in C++</category><title>Calender</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;#include &amp;lt;iostream.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;iomanip.h&amp;gt;

typedef int Bool;

// converts 0 to &#39;S&#39;, 1 to &#39;M&#39;, etc
char whatDay (int); 

// not very good check for leap years
Bool isLeapYear (int); 

// takes the number of the month, a flag saying whether year is leap 
int numOfDaysInMonth (int,Bool); 

void printHeader (int); 

// takes the number of the month, and the first day, prints, and updates
// the first day of the next month
void printMonth (int, int&amp;amp;); 

// prints the specified amount of spaces
void skip (int);

// prints leading spaces in monthly calendar
void skipToDay (int);

// terminates program in case of unrecoverable errors
void disaster (); 

void main () {

  int year, firstDayInCurrentMonth;
  Bool leap;
  int currentMonth = 1; // start at Jan
  int numDays;

  cout &amp;lt;&amp;lt; &quot;What year do you want a calendar for? &quot;;
  cin &amp;gt;&amp;gt; year;
  cout &amp;lt;&amp;lt; &quot;What day of the week does January 1 fall on?&quot; &amp;lt;&amp;lt; endl;
  cout &amp;lt;&amp;lt; &quot;(Enter 0 for Sunday, 1 for Monday, etc.) &quot;;
  cin &amp;gt;&amp;gt; firstDayInCurrentMonth;

  leap = isLeapYear(year);
  skip(9); cout &amp;lt;&amp;lt; year &amp;lt;&amp;lt; endl;

  while (currentMonth &amp;lt;= 12) {
    numDays = numOfDaysInMonth(currentMonth,leap);
    printHeader(currentMonth);
    printMonth(numDays, firstDayInCurrentMonth);
    cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;
    currentMonth = currentMonth + 1;
  }
  cout &amp;lt;&amp;lt; endl;
}

void disaster () {
  cout &amp;lt;&amp;lt; &quot;Disaster! Exiting ...&quot; &amp;lt;&amp;lt; endl;
  exit (-1);
}

void skip (int i) {
  while (i &amp;gt; 0) {
    cout &amp;lt;&amp;lt; &quot; &quot;;
    i = i - 1;
  }
}

char whatDay (int d) {
  if (d == 0) return(&#39;S&#39;);
  else if (d == 1) return(&#39;M&#39;);
  else if (d == 2) return(&#39;T&#39;);
  else if (d == 3) return(&#39;W&#39;);
  else if (d == 4) return(&#39;T&#39;);
  else if (d == 5) return(&#39;F&#39;);
  else if (d == 6) return(&#39;S&#39;);
  else disaster();
}

Bool isLeapYear (int y) {
  return ((y % 4) == 0); // simplified
}

void printHeader (int m) {

  if (m == 1) { skip(7); cout &amp;lt;&amp;lt; &quot;January&quot; &amp;lt;&amp;lt; endl; }
  else if (m == 2) { skip(7); cout &amp;lt;&amp;lt; &quot;February&quot; &amp;lt;&amp;lt; endl; } 
  else if (m == 3) { skip(7); cout &amp;lt;&amp;lt; &quot;March&quot; &amp;lt;&amp;lt; endl; }
  else if (m == 4) { skip(7); cout &amp;lt;&amp;lt; &quot;April&quot; &amp;lt;&amp;lt; endl; }
  else if (m == 5) { skip(7); cout &amp;lt;&amp;lt; &quot;May&quot; &amp;lt;&amp;lt; endl; }
  else if (m == 6) { skip(7); cout &amp;lt;&amp;lt; &quot;June&quot; &amp;lt;&amp;lt; endl; }
  else if (m == 7) { skip(7); cout &amp;lt;&amp;lt; &quot;July&quot; &amp;lt;&amp;lt; endl; }
  else if (m == 8) { skip(7); cout &amp;lt;&amp;lt; &quot;August&quot; &amp;lt;&amp;lt; endl; }
  else if (m == 9) { skip(7); cout &amp;lt;&amp;lt; &quot;September&quot; &amp;lt;&amp;lt; endl; }
  else if (m == 10) { skip(7); cout &amp;lt;&amp;lt; &quot;October&quot; &amp;lt;&amp;lt; endl; }
  else if (m == 11) { skip(7); cout &amp;lt;&amp;lt; &quot;November&quot; &amp;lt;&amp;lt; endl; }
  else if (m == 12) { skip(7); cout &amp;lt;&amp;lt; &quot;December&quot; &amp;lt;&amp;lt; endl; }
  else disaster();

  cout &amp;lt;&amp;lt; &quot; S  M  T  W  T  F  S&quot; &amp;lt;&amp;lt; endl;
  cout &amp;lt;&amp;lt; &quot;____________________&quot; &amp;lt;&amp;lt; endl;
}

int numOfDaysInMonth (int m, Bool leap) {
  if (m == 1) return(31);
  else if (m == 2) if (leap) return(29); else return(28);
  else if (m == 3) return(31);
  else if (m == 4) return(30);
  else if (m == 5) return(31);
  else if (m == 6) return(30);
  else if (m == 7) return(31);
  else if (m == 8) return(31);
  else if (m == 9) return(30);
  else if (m == 10) return(31);
  else if (m == 11) return(30);
  else if (m == 12) return(31);
  else disaster();
}

void skipToDay (int d) {
  skip(3*d);
}

void printMonth (int numDays, int&amp;amp; weekDay) {
  int day = 1;

  skipToDay(weekDay);
  while (day &amp;lt;= numDays) {
    cout &amp;lt;&amp;lt; setw(2) &amp;lt;&amp;lt; day &amp;lt;&amp;lt; &quot; &quot;;
    if (weekDay == 6) {
      cout &amp;lt;&amp;lt; endl;
      weekDay = 0;
    }
    else weekDay = weekDay + 1;
    day = day + 1;
  }
}
&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/calender.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-4684259992349302692</guid><pubDate>Tue, 15 Apr 2014 09:22:00 +0000</pubDate><atom:updated>2014-04-15T02:22:48.543-07:00</atom:updated><title>Grade</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;#include &amp;lt;iostream.h&amp;gt;
#include &amp;lt;fstream.h&amp;gt;

typedef int Bool;

const Bool TRUE = 1;
const Bool FALSE = 0;

char printableBool (Bool i) {
  if (i==FALSE) 
    return &#39;F&#39;;
  else return &#39;T&#39;;
}


int main () {

  ifstream f1, f2, f3check;
  ofstream f3;
  f1.open(&quot;exam&quot;);
  if (!f1) {
    cout &amp;lt;&amp;lt; &quot;Cannot open file exam&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  f2.open(&quot;key&quot;);
  if (!f2) {
    cout &amp;lt;&amp;lt; &quot;Cannot open file key&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  f3check.open(&quot;result&quot;);
  if (f3check) {
    cout &amp;lt;&amp;lt; &quot;File result already exists&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  f3.open(&quot;result&quot;);
  if (!f3) {
    cout &amp;lt;&amp;lt; &quot;Cannot open file result&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }

  int runningSum;
  int ans, key, score;

  runningSum = 0;

  f1 &amp;gt;&amp;gt; ans;
  if (!f1) {
    cout &amp;lt;&amp;lt; &quot;Error reading from file exam&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  f2 &amp;gt;&amp;gt; key; 
  if (!f1) {
    cout &amp;lt;&amp;lt; &quot;Error reading from file key&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  if (ans == key) {
    runningSum = runningSum + 25;
    score = TRUE;
  }
  else score = FALSE;
  f3 &amp;lt;&amp;lt; printableBool(score) &amp;lt;&amp;lt; endl;
  if (!f3) {
    cout &amp;lt;&amp;lt; &quot;Error writing to file result&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }

  f1 &amp;gt;&amp;gt; ans;
  if (!f1) {
    cout &amp;lt;&amp;lt; &quot;Error reading from file exam&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  f2 &amp;gt;&amp;gt; key; 
  if (!f1) {
    cout &amp;lt;&amp;lt; &quot;Error reading from file key&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  if (ans == key) {
    runningSum = runningSum + 25;
    score = TRUE;
  }
  else score = FALSE;
  f3 &amp;lt;&amp;lt; printableBool(score) &amp;lt;&amp;lt; endl;
  if (!f3) {
    cout &amp;lt;&amp;lt; &quot;Error writing to file result&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }

  f1 &amp;gt;&amp;gt; ans;
  if (!f1) {
    cout &amp;lt;&amp;lt; &quot;Error reading from file exam&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  f2 &amp;gt;&amp;gt; key; 
  if (!f1) {
    cout &amp;lt;&amp;lt; &quot;Error reading from file key&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  if (ans == key) {
    runningSum = runningSum + 25;
    score = TRUE;
  }
  else score = FALSE;
  f3 &amp;lt;&amp;lt; printableBool(score) &amp;lt;&amp;lt; endl;
  if (!f3) {
    cout &amp;lt;&amp;lt; &quot;Error writing to file result&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }

  f1 &amp;gt;&amp;gt; ans;
  if (!f1) {
    cout &amp;lt;&amp;lt; &quot;Error reading from file exam&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  f2 &amp;gt;&amp;gt; key; 
  if (!f1) {
    cout &amp;lt;&amp;lt; &quot;Error reading from file key&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }
  if (ans == key) {
    runningSum = runningSum + 25;
    score = TRUE;
  }
  else score = FALSE;
  f3 &amp;lt;&amp;lt; printableBool(score) &amp;lt;&amp;lt; endl;
  if (!f3) {
    cout &amp;lt;&amp;lt; &quot;Error writing to file result&quot; &amp;lt;&amp;lt; endl;
    return 1;
  }

  f3 &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; runningSum &amp;lt;&amp;lt; endl;  
  
}
&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/grade.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-8321441659964948937</guid><pubDate>Tue, 15 Apr 2014 09:20:00 +0000</pubDate><atom:updated>2014-04-15T02:20:52.990-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Merge Sort in C</category><title>Merge Sort In C</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;#include &amp;lt;fstream.h&amp;gt;
#include &amp;lt;iostream.h&amp;gt;

int main () {
  ifstream f1, f2;
  ofstream f3;
  int i,j;

  f1.open(&quot;n1&quot;);
  f2.open(&quot;n2&quot;);
  f3.open(&quot;n1n2&quot;);
  
  f1 &amp;gt;&amp;gt; i;
  f2 &amp;gt;&amp;gt; j;
  while (f1 &amp;amp;&amp;amp; f2) {
    if (i &amp;lt; j) {
      while (i &amp;lt; j &amp;amp;&amp;amp; f1 &amp;amp;&amp;amp; f3) {
 f3 &amp;lt;&amp;lt; i &amp;lt;&amp;lt; endl;
 f1 &amp;gt;&amp;gt; i;
      }
    }
    else {
      while (j &amp;lt;= i &amp;amp;&amp;amp; f2 &amp;amp;&amp;amp; f3) {
 f3 &amp;lt;&amp;lt; j &amp;lt;&amp;lt; endl;
 f2 &amp;gt;&amp;gt; j;
      }
    }
  }
  while (f1) {
    f3 &amp;lt;&amp;lt; i &amp;lt;&amp;lt; endl;
    f1 &amp;gt;&amp;gt; i;
  }
  while (f2) {
    f3 &amp;lt;&amp;lt; j &amp;lt;&amp;lt; endl;
    f2 &amp;gt;&amp;gt; j;
  }
  return (0);
}&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/merge-sort-in-c.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-4787765803423282647</guid><pubDate>Tue, 15 Apr 2014 05:52:00 +0000</pubDate><atom:updated>2014-04-14T22:52:05.875-07:00</atom:updated><title>Average Of Two Numbers in C++</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;#include &amp;lt;fstream.h&amp;gt;

void main () {

ifstream f1;
ofstream f2;
f1.open(&quot;scores.96&quot;);
f2.open(&quot;final.96&quot;);

int s1, s2, s3;
float w1, w2, w3;

f1 &amp;gt;&amp;gt; s1 &amp;gt;&amp;gt; w1;
f1 &amp;gt;&amp;gt; s2 &amp;gt;&amp;gt; w2;
f1 &amp;gt;&amp;gt; s3 &amp;gt;&amp;gt; w3;
f2 &amp;lt;&amp;lt; (s1*w1+s2*w2+s3*w3);

}&lt;/pre&gt;
&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/average-of-two-numbers-in-c.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-9057107450218935303</guid><pubDate>Mon, 14 Apr 2014 13:06:00 +0000</pubDate><atom:updated>2014-04-14T06:06:51.618-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Cricket 2014</category><category domain="http://www.blogger.com/atom/ns#">ipl</category><category domain="http://www.blogger.com/atom/ns#">ipl 7</category><title>You Can See Live Streaming Of IPL here :</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;a href=&quot;http://loadyoursystem.blogspot.in/p/ipl.html&quot; target=&quot;_blank&quot;&gt;LIVE STREAMING&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;a href=&quot;http://loadyoursystem.blogspot.in/p/ipl.html&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://www.thecareermuse.co.in/wp-content/uploads/2013/05/ipl.jpg&quot; height=&quot;377&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/you-can-see-live-streaming-of-ipl-here.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-8944797779551833421</guid><pubDate>Mon, 14 Apr 2014 12:52:00 +0000</pubDate><atom:updated>2014-04-14T05:52:38.425-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">binary</category><category domain="http://www.blogger.com/atom/ns#">c program</category><category domain="http://www.blogger.com/atom/ns#">conversion</category><category domain="http://www.blogger.com/atom/ns#">decimal</category><category domain="http://www.blogger.com/atom/ns#">Decimal to binary conversion in c</category><title>Decimal to binary conversion</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: large;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=sabir25-&quot; target=&quot;_blank&quot;&gt;Decimal to binary conversion&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;C program to convert decimal to binary: c language code to convert an integer from decimal number system(base-10) to binary number system(base-2). Size of integer is assumed to be 32 bits. We use bitwise operators to perform the desired task. We right shift the original number by 31, 30, 29, ..., 1, 0 bits using a loop and bitwise AND the number obtained with 1(one), if the result is 1 then that bit is 1 otherwise it is 0(zero).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;C programming code&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;int main()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; int n, c, k;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; printf(&quot;Enter an integer in decimal number system\n&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; scanf(&quot;%d&quot;, &amp;amp;n);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; printf(&quot;%d in binary number system is:\n&quot;, n);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; for (c = 31; c &amp;gt;= 0; c--)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; k = n &amp;gt;&amp;gt; c;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; if (k &amp;amp; 1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&quot;1&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&quot;0&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; printf(&quot;\n&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; return 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;OutPut Of Program:&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=sabir25-&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Decimal to binary c program&quot; src=&quot;http://www.programmingsimplified.com/images/c/decimal-binary-c.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/decimal-to-binary-conversion.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-4422856446557685866</guid><pubDate>Sun, 13 Apr 2014 16:02:00 +0000</pubDate><atom:updated>2014-04-13T09:03:33.348-07:00</atom:updated><title>programing in c - 1</title><description>&lt;div id=&quot;tab2&quot; class=&quot;tab_content&quot;  align=&quot;left&quot;&gt;&lt;object width=&quot;570&quot; height=&quot;380&quot;&gt;     &lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/3QiItmIWmOM?rel=1&amp;border=1&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/3QiItmIWmOM?rel=1&amp;color1=0xcbba9f&amp;color2=0xcbba9f&amp;border=0&amp;fs=1&quot;wmode=Opaque
      type=&quot;application/x-shockwave-flash&quot;
      allowscriptaccess=&quot;always&quot;
      width=&quot;570&quot; height=&quot;380&quot; 
      allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;   &lt;/object&gt;&lt;br /&gt;
&lt;/div&gt;</description><link>http://loadyoursystem.blogspot.com/2014/04/programing.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-4916966173111673752</guid><pubDate>Sun, 13 Apr 2014 16:00:00 +0000</pubDate><atom:updated>2014-04-13T09:03:17.995-07:00</atom:updated><title>Introduction to c programing and data structure programming</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div id=&quot;tab2&quot; class=&quot;tab_content&quot;  align=&quot;left&quot;&gt;&lt;object width=&quot;570&quot; height=&quot;380&quot;&gt;     &lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/S47aSEqm_0I?rel=1&amp;border=1&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/S47aSEqm_0I?rel=1&amp;color1=0xcbba9f&amp;color2=0xcbba9f&amp;border=0&amp;fs=1&quot;wmode=Opaque
      type=&quot;application/x-shockwave-flash&quot;
      allowscriptaccess=&quot;always&quot;
      width=&quot;570&quot; height=&quot;380&quot; 
      allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;   &lt;/object&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</description><link>http://loadyoursystem.blogspot.com/2014/04/blog-post_9725.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-4657299043565438094</guid><pubDate>Sun, 13 Apr 2014 14:12:00 +0000</pubDate><atom:updated>2014-04-13T07:12:07.520-07:00</atom:updated><title></title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; int n, i,&amp;nbsp; c, a = 1;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; printf(&quot;Enter the number of rows of Floyd&#39;s triangle to print\n&quot;);&lt;br /&gt;&amp;nbsp; scanf(&quot;%d&quot;, &amp;amp;n);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; for (i = 1; i &amp;lt;= n; i++)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (c = 1; c &amp;lt;= i; c++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;%d &quot;,a);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a++;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;\n&quot;);&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; return 0;&lt;br /&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCXwHQx06MfWV2Yb8S9anpGsTifHtFqT85jRVtIth39Qeh2LcE5a6aIKLeJkXMb8uilTG5cPOY4LPvNxn0A7y6bq3oux-ThLCaCeacuR5fvoLdBh5yY0GVh1O-kqsRJ-yHOkr22M9r1NgB/s1600/floyd-triangle-c.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCXwHQx06MfWV2Yb8S9anpGsTifHtFqT85jRVtIth39Qeh2LcE5a6aIKLeJkXMb8uilTG5cPOY4LPvNxn0A7y6bq3oux-ThLCaCeacuR5fvoLdBh5yY0GVh1O-kqsRJ-yHOkr22M9r1NgB/s1600/floyd-triangle-c.png&quot; height=&quot;162&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/blog-post_1756.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCXwHQx06MfWV2Yb8S9anpGsTifHtFqT85jRVtIth39Qeh2LcE5a6aIKLeJkXMb8uilTG5cPOY4LPvNxn0A7y6bq3oux-ThLCaCeacuR5fvoLdBh5yY0GVh1O-kqsRJ-yHOkr22M9r1NgB/s72-c/floyd-triangle-c.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6523603326694228986.post-1787299329507084709</guid><pubDate>Sun, 13 Apr 2014 14:07:00 +0000</pubDate><atom:updated>2014-04-13T07:07:27.758-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Pascle triangle in java</category><title>Pascle Triangle</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
public class Pascal&lt;br /&gt;{&lt;br /&gt;int i,j,k,l=1;&lt;br /&gt;void PrintPascal(int n)&lt;br /&gt;{&lt;br /&gt;for (i=1;i&amp;lt;=n;i++)&lt;br /&gt;{&lt;br /&gt;for(j=1;j&amp;lt;=n-i;j++)&lt;br /&gt;{&lt;br /&gt;System.out.print(&quot; &quot;);&lt;br /&gt;}&lt;br /&gt;for(k=0;k&amp;lt;i;k++)&lt;br /&gt;{&lt;br /&gt;System.out.print(i +&quot; &quot; );&lt;br /&gt;}&lt;br /&gt;System.out.println();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public static void main (String[] args)&lt;br /&gt;{&lt;br /&gt;Pascal p=new Pascal();&lt;br /&gt;p.PrintPascal(5);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;OUTPUT :&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;br /&gt;&amp;nbsp;&amp;nbsp; 2 2&lt;br /&gt;&amp;nbsp; 3 3 3&lt;br /&gt;&amp;nbsp;4 4 4 4&lt;br /&gt;5 5 5 5 5&lt;/div&gt;
</description><link>http://loadyoursystem.blogspot.com/2014/04/pascle-triangle.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item></channel></rss>