<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alpha_Edit</title>
    <description>The latest articles on DEV Community by Alpha_Edit (@alpha_edit).</description>
    <link>https://dev.to/alpha_edit</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F592268%2F0da8af05-2283-454d-806a-735d421e80df.jpeg</url>
      <title>DEV Community: Alpha_Edit</title>
      <link>https://dev.to/alpha_edit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alpha_edit"/>
    <language>en</language>
    <item>
      <title>I am Starting #100daysofcode !</title>
      <dc:creator>Alpha_Edit</dc:creator>
      <pubDate>Mon, 19 Apr 2021 04:33:06 +0000</pubDate>
      <link>https://dev.to/codelyf/i-am-starting-100daysofcode-56e3</link>
      <guid>https://dev.to/codelyf/i-am-starting-100daysofcode-56e3</guid>
      <description>&lt;p&gt;Hello folks,&lt;br&gt;
I am starting #100daysofcode! I will be posting the daily update in dev.to. Make sure to follow me to get the update of the blog i post.&lt;br&gt;
I also have a github repo of all the side projects i do in 100 days.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Codely-F"&gt;
        Codely-F
      &lt;/a&gt; / &lt;a href="https://github.com/Codely-F/100daysofcode"&gt;
        100daysofcode
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      This is the repo for #100daysofcode challenge.
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Let the challenge begin!&lt;/p&gt;

</description>
      <category>100daysofcode</category>
      <category>challenge</category>
      <category>motivation</category>
    </item>
    <item>
      <title>C Programming Cheat Sheet - 6</title>
      <dc:creator>Alpha_Edit</dc:creator>
      <pubDate>Sun, 11 Apr 2021 14:09:56 +0000</pubDate>
      <link>https://dev.to/alpha_edit/c-programming-cheat-sheet-6-26h9</link>
      <guid>https://dev.to/alpha_edit/c-programming-cheat-sheet-6-26h9</guid>
      <description>&lt;h3&gt;
  
  
  6 Strings
&lt;/h3&gt;

&lt;h4&gt;
  
  
  6.1 What is String?
&lt;/h4&gt;

&lt;p&gt;Strings are arrays of characters. Each member of array contains one of characters in the string.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include&amp;lt;stdio.h&amp;gt; 
main() 
{ 
    char name[20]; 
    printf("Enter your name : "); 
    scanf("%s",name); 
    printf("Hello, %s , how are you ?\n",name); 
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output Results:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter your name : Vineet 
Hello, Vineet, how are you ?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If user enters "Vineet" then the first member of array will contain 'V' , second cell will contain 'i' and so on. C determines end of a string by a zero value character. We call this character as &lt;code&gt;NULL&lt;/code&gt; character and show it with &lt;code&gt;\0&lt;/code&gt; character. (It's only one character and its value is 0, however we show it with two characters to remember it is a character type, not an integer).&lt;/p&gt;

&lt;p&gt;Equally we can make that string by assigning character values to each member.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name[0]='B'; 
name[1]='r'; 
name[2]='i'; 
name[3]='a'; 
name[4]='n'; 
name[5]='\0';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As we saw in above example placeholder for string variables is &lt;code&gt;%s&lt;/code&gt;. Also we will not use a &lt;code&gt;&amp;amp;&lt;/code&gt; sign for receiving string values.&lt;/p&gt;

&lt;h4&gt;
  
  
  6.2 Point to Note
&lt;/h4&gt;

&lt;p&gt;While entering the string using &lt;code&gt;scanf()&lt;/code&gt; we must be cautious about&lt;br&gt;
two things:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* The length of the string should not exceed the dimension of the character array. This is because the C compiler doesn’t perform bounds checking on character arrays.
* `scanf()` is not capable of receiving multi-word strings. Therefore names such as "Vineet Choudhary" would be unacceptable. The way to get around this limitation is by using the function `gets()`.The usage of functions `gets()` and its counter part `puts()` is shown below.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include&amp;lt;stdio.h&amp;gt; 
main( ) 
{ 
    char name[25] ; 
    printf ("Enter your full name ") ; 
    gets (name) ; 
    puts ("Hello!") ; 
    puts (name) ; 
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;And here is the output...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter your name Vineet Choudhary 
Hello! 
Vineet Choudhary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The program and the output are self-explanatory except for the fact that, &lt;code&gt;puts()&lt;/code&gt; can display only one string at a time (hence the use of two &lt;code&gt;puts()&lt;/code&gt; in the program above). Also, on displaying a string, unlike &lt;code&gt;printf()&lt;/code&gt;, &lt;code&gt;puts()&lt;/code&gt; places the cursor on the next line. Though &lt;code&gt;gets()&lt;/code&gt; is capable of receiving only one string at a time, the plus point with &lt;code&gt;gets()&lt;/code&gt; is that it can receive a multi-word string.&lt;/p&gt;

&lt;p&gt;If we are prepared to take the trouble we can make &lt;code&gt;scanf()&lt;/code&gt; accept multi-word strings by writing it in this manner:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;char name[25] ; 
printf ("Enter your full name ") ; 
scanf ("%[^\n]s", name) ;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Though workable this is the best of the ways to call a function, you would agree.&lt;/p&gt;

&lt;h4&gt;
  
  
  6.3 Standard Library String Functions
&lt;/h4&gt;

&lt;p&gt;With every C compiler a large set of useful string handling library functions are provided in &lt;code&gt;string.h&lt;/code&gt; file.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* `strlen` - Finds length of a string
* `strlwr` - Converts a string to lowercase
* `strupr` - Converts a string to uppercase
* `strcat` - Appends one string at the end of another
* `strncat` - Appends first n characters of a string at the end of
another
* `strcpy` - Copies a string into another
* `strncpy` - Copies first n characters of one string into another
* `strcmp` - Compares two strings
* `strncmp` - Compares first n characters of two strings
* `strcmpi` - Compares two strings without regard to case ("i" denotes
that this function ignores case)
* `stricmp` - Compares two strings without regard to case (identical to
strcmpi)
* `strnicmp` - Compares first n characters of two strings without regard
to case
* `strdup` - Duplicates a string
* `strchr` - Finds first occurrence ofa given character in a string
* `strrchr` - Finds last occurrence ofa given character in a string
* `strstr` - Finds first occurrence of a given string in another string
* `strset` - Sets all characters ofstring to a given character
* `strnset` - Sets first n characters ofa string to a given character
* `strrev` - Reverses string
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Make sure to Follow me here, to get the update when i post a blog.&lt;/p&gt;

</description>
      <category>c</category>
    </item>
    <item>
      <title>C Programming Cheat Sheet - 5</title>
      <dc:creator>Alpha_Edit</dc:creator>
      <pubDate>Sat, 10 Apr 2021 05:29:48 +0000</pubDate>
      <link>https://dev.to/alpha_edit/c-programming-cheat-sheet-5-3ico</link>
      <guid>https://dev.to/alpha_edit/c-programming-cheat-sheet-5-3ico</guid>
      <description>&lt;p&gt;Here is the C Programming Cheat - 5&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Arrays
&lt;/h3&gt;

&lt;p&gt;Arrays are structures that hold multiple variables of the same data type. The first element in the array is numbered 0, so the last element is 1 less than the size of the array. An array is also known as a sub scripted variable. Before using an array its type and dimension must be declared.&lt;/p&gt;

&lt;h4&gt;
  
  
  5.1 Array Declaration
&lt;/h4&gt;

&lt;p&gt;Like other variables an array needs to be declared so that the compiler will know what kind of an array and how large an array we want.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int marks[30] ;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;int&lt;/code&gt; specifies the type of the variable, just as it does with ordinary variables and the word &lt;code&gt;marks&lt;/code&gt; specifies the name of the variable. The &lt;code&gt;[30]&lt;/code&gt; however is new. The number 30 tells how many elements of the type int will be in our array. This number is often called the "dimension" of the array. The bracket &lt;code&gt;( [ ] )&lt;/code&gt; tells the compiler that we are dealing with an array.&lt;/p&gt;

&lt;p&gt;Let us now see how to initialize an array while declaring it. Following are a few examples that demonstrate this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int num[6] = { 2, 4, 12, 5, 45, 5 } ; 
int n[] = { 2, 4, 12, 5, 45, 5 } ; 
float press[] = { 12.3, 34.2 -23.4, -11.3 } ;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  5.2 Accessing Elements of an Array
&lt;/h4&gt;

&lt;p&gt;Once an array is declared, let us see how individual elements in the array can be referred. This is done with subscript, the number in the brackets following the array name. This number specifies the element’s position in the array. All the array elements are numbered, starting with 0. Thus, marks [2] is not the second element of the array, but the third.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int valueOfThirdElement = marks[2];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  5.3 Entering Data into an Array
&lt;/h4&gt;

&lt;p&gt;Here is the section of code that places data into an array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for(i = 0;i &amp;lt;= 29;i++) 
{ 
    printf("\nEnter marks "); 
    scanf("%d", &amp;amp;marks[i]); 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;for&lt;/code&gt; loop causes the process of asking for and receiving a student’s marks from the user to be repeated 30 times. The first time through the loop, &lt;code&gt;i&lt;/code&gt; has a value 0, so the &lt;code&gt;scanf()&lt;/code&gt; function will cause the value typed to be stored in the array element &lt;code&gt;marks[0]&lt;/code&gt;, the first element of the array. This process will be repeated until &lt;code&gt;i&lt;/code&gt; becomes 29. This is last time through the loop, which is a good thing, because there is no array element like &lt;code&gt;marks[30]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;scanf()&lt;/code&gt; function, we have used the &lt;em&gt;"address of"&lt;/em&gt; operator (&amp;amp;) on the element &lt;code&gt;marks[i&lt;/code&gt;] of the array. In so doing, we are passing the address of this particular array element to the &lt;code&gt;scanf()&lt;/code&gt; function, rather than its value; which is what &lt;code&gt;scanf()&lt;/code&gt; requires.&lt;/p&gt;

&lt;h4&gt;
  
  
  5.4 Reading Data from an Array
&lt;/h4&gt;

&lt;p&gt;The balance of the program reads the data back out of the array and uses it to calculate the average. The for loop is much the same, but now the body of the loop causes each student’s marks to be added to a running total stored in a variable called sum. When all the marks have been added up, the result is divided by 30, the number of students, to get the average.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ( i = 0 ; i &amp;lt;= 29 ; i++ )
    sum = sum + marks[i] ; 
avg = sum / 30 ; 
printf ( "\nAverage marks = %d", avg ) ;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  5.5 Example
&lt;/h4&gt;

&lt;p&gt;Let us try to write a program to find average marks obtained by a&lt;br&gt;
class of 30 students in a test.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include&amp;lt;stdio.h&amp;gt;  
main() 
{ 
    int avg, i, sum=0; 
    int marks[30] ; /*array declaration */ 
    for ( i = 0 ; i &amp;lt;= 29 ; i++ ) 
    { 
        printf ( "\nEnter marks " ) ; 
        scanf ( "%d", &amp;amp;marks[i] ) ; /* store data in array */ 
    } 
    for ( i = 0 ; i &amp;lt;= 29 ; i++ ) 
        sum = sum + marks[i] ; /* read data from an array*/ 
    avg = sum / 30 ; 
    printf ( "\nAverage marks = %d", avg ) ; 
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure to Follow me here, to get the update when i post a blog.&lt;/p&gt;

</description>
      <category>c</category>
    </item>
    <item>
      <title>C Programming Cheat Sheet -4</title>
      <dc:creator>Alpha_Edit</dc:creator>
      <pubDate>Fri, 09 Apr 2021 10:19:41 +0000</pubDate>
      <link>https://dev.to/alpha_edit/c-programming-cheat-sheet-4-5adn</link>
      <guid>https://dev.to/alpha_edit/c-programming-cheat-sheet-4-5adn</guid>
      <description>&lt;h3&gt;
  
  
  4.The Loop Control Structure
&lt;/h3&gt;

&lt;p&gt;Sometimes we want some part of our code to be executed more than once. We can either repeat the code in our program or use loops instead. It is obvious that if for example we need to execute some part of code for a hundred times it is not practical to repeat the code. Alternatively we can use our repeating code inside a loop.&lt;/p&gt;

&lt;p&gt;There are three methods &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt; and &lt;code&gt;do-while&lt;/code&gt; which we can repeat a part of a program.&lt;/p&gt;

&lt;h4&gt;
  
  
  4.1 while loop
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;while&lt;/code&gt; loop is constructed of a condition or expression and a single command or a block of commands that must run&lt;br&gt;
in a loop.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//for single statement  
while(expression) 
    statement;

//for multiple statement   
while(expression) 
{ 
    block of statement 
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The statements within the &lt;code&gt;while&lt;/code&gt; loop would keep on getting executed till the condition being tested remains true. When the condition becomes false, the control passes to the first statement that follows the body of the &lt;code&gt;while&lt;/code&gt; loop.&lt;br&gt;
The general form of &lt;code&gt;while&lt;/code&gt; is as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;initialise loop counter;  
while (test loopcounter using a condition) 
{ 
    do this; 
    and this; 
    increment loopcounter;
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4.2 for loop
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;for&lt;/code&gt; loop is something similar to &lt;code&gt;while&lt;/code&gt; loop but it is more complex. &lt;code&gt;for&lt;/code&gt; loop is constructed from a control statement that determines how many times the loop will run and a command section. Command section is either a single command or a block of commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//for single statement  
for(control statement) 
    statement;  

//for multiple statement
for(control statement) 
{ 
    block of statement 
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Control statement itself has three parts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ( initialization; test condition; run every time command )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* `Initialization` part is performed only once at `for` loop start. We can initialize a loop variable here.
* `Test condition` is the most important part of the loop. Loop will continue to run if this condition is valid (true). If the condition becomes invalid (false) then the loop will terminate.
* `Run every time command` section will be performed in every loop cycle. We use this part to reach the final condition for terminating the loop. **For example** we can increase or decrease loop variable’s value in a way that after specified number of cycles the loop condition becomes invalid and `for` loop can terminate.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  4.3 do-while loop
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;while&lt;/code&gt; and &lt;code&gt;for&lt;/code&gt; loops test the termination condition at the top. By contrast, the third loop in C, the &lt;code&gt;do-while&lt;/code&gt;, tests at the bottom after making each pass through the loop body; the body is always executed at least once.&lt;br&gt;
The syntax of the do is&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do
{
    statements;
}while (expression);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The statement is executed, then expression is evaluated. If it is true, statement is evaluated again, and so on. When the expression becomes false, the loop terminates. Experience shows that &lt;code&gt;do-while&lt;/code&gt; is much less used than while and for. A &lt;code&gt;do-while&lt;/code&gt; loop is used to ensure that the statements within the loop are executed at least once.&lt;/p&gt;

&lt;h4&gt;
  
  
  4.4 Break and Continue statement
&lt;/h4&gt;

&lt;p&gt;We used &lt;code&gt;break&lt;/code&gt; statement in &lt;code&gt;switch...case&lt;/code&gt; structures in previously. We can also use "break" statement inside loops to terminate a loop and exit it (with a specific condition).&lt;/p&gt;

&lt;p&gt;In above example loop execution continues until either &lt;code&gt;num&amp;gt;=20&lt;/code&gt; or entered score is negative.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;while (num&amp;lt;20) 
{ 
    printf("Enter score : "); 
    scanf("%d",&amp;amp;scores[num]); 
    if(scores[num]&amp;lt;0) 
        break; 
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Continue&lt;/code&gt; statement can be used in loops. Like break command &lt;code&gt;continue&lt;/code&gt; changes flow of a program. It does not terminate the loop however. It just skips the rest of current iteration of the loop and returns to starting point of the loop.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include&amp;lt;stdio.h&amp;gt; 
main() 
{ 
    while((ch=getchar())!='\n') 
    { 
        if(ch=='.') 
            continue; 
        putchar(ch); 
    }  
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In above example, program accepts all input but omits the '.' character from it. The text will be echoed as you enter it but the main output will be printed after you press the enter key (which is equal to inserting a "\n" character) is pressed. As we told earlier this is because &lt;code&gt;getchar()&lt;/code&gt; function is a buffered input function.&lt;/p&gt;

&lt;h4&gt;
  
  
  4.5 Goto and labels
&lt;/h4&gt;

&lt;p&gt;C provides the infinitely-abusable &lt;code&gt;goto&lt;/code&gt; statement, and &lt;code&gt;labels&lt;/code&gt; to branch to. Formally, the &lt;code&gt;goto&lt;/code&gt; statement is never necessary, and in practice it is almost always easy to write code without it. We have not used &lt;code&gt;goto&lt;/code&gt; in this book.&lt;/p&gt;

&lt;p&gt;Nevertheless, there are a few situations where &lt;code&gt;gotos&lt;/code&gt; may find a place. The most common is to abandon processing in some deeply nested structure, such as breaking out of two or more loops at once. The break statement cannot be used directly since it only exits from the innermost loop. Thus:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ( ... )
{           
    for ( ... ) 
    {               
        ...               
        if (disaster)
        {                   
            goto error;
        }           
    }
}       
...   
error:       
/* clean up the mess */
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This organization is handy if the error-handling code is non-trivial, and if errors can occur in several places.&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;label&lt;/code&gt; has the same form as a variable name, and is followed by a colon. It can be attached to any statement in the same function as the &lt;code&gt;goto&lt;/code&gt;. The scope of a label is the entire function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; - By uses of &lt;code&gt;goto&lt;/code&gt;, programs become unreliable, unreadable, and hard to debug. And yet many programmers find &lt;code&gt;goto&lt;/code&gt; seductive.&lt;/p&gt;




&lt;p&gt;Make sure to follow me here :)&lt;/p&gt;

</description>
      <category>c</category>
    </item>
    <item>
      <title>C Programming Cheat Sheet - 3</title>
      <dc:creator>Alpha_Edit</dc:creator>
      <pubDate>Tue, 06 Apr 2021 08:39:26 +0000</pubDate>
      <link>https://dev.to/alpha_edit/c-programming-cheat-sheet-3-5ajm</link>
      <guid>https://dev.to/alpha_edit/c-programming-cheat-sheet-3-5ajm</guid>
      <description>&lt;h2&gt;
  
  
  3.The Decision Control Structure
&lt;/h2&gt;

&lt;p&gt;C has three major decision making instructions—the &lt;code&gt;if&lt;/code&gt; statement, the &lt;code&gt;if-else&lt;/code&gt; statement, and the &lt;code&gt;switch&lt;/code&gt; statement.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.1 The If Statement
&lt;/h3&gt;

&lt;p&gt;C Uses The keyword &lt;code&gt;if&lt;/code&gt; to implement the decision control instruction. The general form of &lt;code&gt;if&lt;/code&gt; statement looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//for single statement
if(condition) 
    statement;

//for multiple statement
if(condition) 
{ 
    block of statement; 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The more general form is as follow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//for single statement
if(expression) 
    statement;

//for multiple statement
if(expression) 
{ 
    block of statement; 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the expression can be any valid expression including a relational expression. We can even use arithmetic expressions in the if statement. For example all the following if statements are valid&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (3 + 2 % 5) 
    printf("This works");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The expression &lt;code&gt;(3 + 2 % 5)&lt;/code&gt; evaluates to 5 and since 5 is non-zero it is considered to be true. Hence the &lt;code&gt;printf("This works");&lt;/code&gt; gets executed.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2 The If-Else Statement
&lt;/h3&gt;

&lt;p&gt;The if statement by itself will execute a single statement, or a group of statements, when the expression following if evaluates to true. It does nothing when the expression evaluates to false. Can we execute one group of statements if the expression evaluates to true and another group of statements if the expression evaluates to false? Of course! This is what is the purpose of the else statement that is demonstrated as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (expression)
{ 
    block of statement;
}
else
    statement;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Note&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The group of statements after the &lt;code&gt;if&lt;/code&gt;upto and not including the &lt;code&gt;else&lt;/code&gt; is called an &lt;code&gt;if block&lt;/code&gt;. Similarly, the statement after the &lt;code&gt;else&lt;/code&gt; form the &lt;code&gt;else block&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Notice that the &lt;code&gt;else&lt;/code&gt; is written exactly below the &lt;code&gt;if&lt;/code&gt;. The statements in the &lt;code&gt;if block&lt;/code&gt; and those in the &lt;code&gt;else block&lt;/code&gt; have been indented to the right.&lt;/li&gt;
&lt;li&gt;Had there been only one statement to be executed in the &lt;code&gt;if block&lt;/code&gt; and only one statement in the &lt;code&gt;else block&lt;/code&gt; we could have dropped the pair of braces.&lt;/li&gt;
&lt;li&gt;As with the &lt;code&gt;if&lt;/code&gt; statement, the default scope of &lt;code&gt;else&lt;/code&gt; is also the statement immediately after the &lt;code&gt;else&lt;/code&gt;. To override this default scope a pair of braces as shown in the above &lt;em&gt;"Multiple Statements within if"&lt;/em&gt; must be used.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.3 Nested if-else
&lt;/h3&gt;

&lt;p&gt;If we write an entire &lt;code&gt;if-else&lt;/code&gt; construct within either the body of the &lt;code&gt;if&lt;/code&gt; statement or the body of an &lt;code&gt;else&lt;/code&gt; statement. This is called &lt;strong&gt;nesting of &lt;code&gt;ifs&lt;/code&gt;&lt;/strong&gt;. This is demonstrated as -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (expression1)
    statement;
else 
{
    if (expression2)
        statement;  
    else
    { 
        block of statement;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.4 The if-else Ladder/else-if Clause
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;else-if&lt;/code&gt; is the most general way of writing a multi-way decision.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(expression1) 
    statement; 
else if(expression2) 
    statement; 
else if(expression3) 
    statement; 
else if(expression4) 
{ 
    block of statement; 
} 
else 
    statement;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The expressions are evaluated in order; if an expressions true, the &lt;em&gt;"statement"&lt;/em&gt; or &lt;em&gt;"block of statement"&lt;/em&gt; associated with it is executed, and this terminates the whole chain. As always, the code for each statement is either a single statement, or a group of them in braces. The last &lt;code&gt;else&lt;/code&gt; part handles the &lt;em&gt;"none of the above"&lt;/em&gt; or &lt;em&gt;default case&lt;/em&gt; where none of the other conditions is satisfied.&lt;/p&gt;

&lt;h4&gt;
  
  
  3.5 Switch Statements or Control Statements
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;switch&lt;/code&gt; statement is a multi-way decision that tests whether an expression matches one of a number of &lt;code&gt;constant&lt;/code&gt; integer values, and branches accordingly. The &lt;code&gt;switch&lt;/code&gt; statement that allows us to make a decision from the number of choices is called a &lt;code&gt;switch&lt;/code&gt;, or more correctly s&lt;code&gt;witch-case-default&lt;/code&gt;, since these three keywords go together to make up the &lt;code&gt;switch&lt;/code&gt; statement.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;switch (expression) 
{
    case constant-expression: 
        statement1;
        statement2;
        break;
    case constant-expression: 
        statement;
        break;
    ...
    default: 
        statement;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In &lt;code&gt;switch…case&lt;/code&gt; command, each &lt;code&gt;case&lt;/code&gt; acts like a simple label. A label determines a point in program which execution must continue from there. &lt;code&gt;Switch&lt;/code&gt; statement will choose one of &lt;code&gt;case&lt;/code&gt; sections or labels from where the execution of the program will continue. The program will continue execution until it reaches &lt;code&gt;break&lt;/code&gt; command.

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;break&lt;/code&gt; statements have vital rule in &lt;code&gt;switch&lt;/code&gt; structure. If you remove these statements, program execution will continue to next case sections and all remaining case sections until the end of switch block will be executed (while most of the time we just want one case section to be run).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;default section&lt;/code&gt; will be executed if none of the &lt;code&gt;case&lt;/code&gt; sections match &lt;code&gt;switch&lt;/code&gt; comparison.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.6 switch Versus if-else Ladder
&lt;/h3&gt;

&lt;p&gt;There are some things that you simply cannot do with a &lt;code&gt;switch&lt;/code&gt;.&lt;br&gt;
These are:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*  A float expression cannot be tested using a switch
* Cases can never have variable expressions (for example it is wrong to say `case a +3` )
* Multiple cases cannot use same expressions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>c</category>
    </item>
    <item>
      <title>C Programming Cheat Sheet - 2</title>
      <dc:creator>Alpha_Edit</dc:creator>
      <pubDate>Tue, 06 Apr 2021 07:01:37 +0000</pubDate>
      <link>https://dev.to/alpha_edit/c-programming-cheat-sheet-2-39n9</link>
      <guid>https://dev.to/alpha_edit/c-programming-cheat-sheet-2-39n9</guid>
      <description>&lt;p&gt;Here is the C Programming Cheat Sheet - Part 2&lt;/p&gt;

&lt;h3&gt;
  
  
  2.Expression &amp;amp; Operators Precedence
&lt;/h3&gt;

&lt;p&gt;Following table summarizes the rules for precedence and associativity of all operators, including those that we have not yet discussed. Operators on the same line have the same precedence; rows are in order of decreasing precedence, so, for example, *, /, and % all have the same precedence, which is higher than that of binary + and -. The ``operator'' () refers to function call. The operators -&amp;gt; and . are used to access members of structures;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Operators&lt;/th&gt;
&lt;th&gt;Associativity&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Function Expression&lt;/td&gt;
&lt;td&gt;()&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Array Expression&lt;/td&gt;
&lt;td&gt;[]&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structure Operator&lt;/td&gt;
&lt;td&gt;-&amp;gt;&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structure Operator&lt;/td&gt;
&lt;td&gt;.&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unary minus&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Right to Left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Increment/Decrement&lt;/td&gt;
&lt;td&gt;++, --&lt;/td&gt;
&lt;td&gt;Right to Left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One’s compliment&lt;/td&gt;
&lt;td&gt;~&lt;/td&gt;
&lt;td&gt;Right to Left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Negation&lt;/td&gt;
&lt;td&gt;!&lt;/td&gt;
&lt;td&gt;Right to Left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Address of&lt;/td&gt;
&lt;td&gt;&amp;amp;&lt;/td&gt;
&lt;td&gt;Right to Left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Value of address&lt;/td&gt;
&lt;td&gt;'*'&lt;/td&gt;
&lt;td&gt;Right to Left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Type cast&lt;/td&gt;
&lt;td&gt;(type)&lt;/td&gt;
&lt;td&gt;Right to Left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Size in bytes&lt;/td&gt;
&lt;td&gt;sizeof&lt;/td&gt;
&lt;td&gt;Right to Left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multiplication&lt;/td&gt;
&lt;td&gt;'*'&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Division&lt;/td&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modulus&lt;/td&gt;
&lt;td&gt;%&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Addition&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subtraction&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Left Shift&lt;/td&gt;
&lt;td&gt;&amp;lt;&amp;lt;&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Right Shift&lt;/td&gt;
&lt;td&gt;&amp;gt;&amp;gt;&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Less Than&lt;/td&gt;
&lt;td&gt;&amp;lt;&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Less Than or Equal to&lt;/td&gt;
&lt;td&gt;&amp;lt;+&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Greater Than&lt;/td&gt;
&lt;td&gt;&amp;gt;&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Greater Than or equal&lt;/td&gt;
&lt;td&gt;&amp;gt;+&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Equal to&lt;/td&gt;
&lt;td&gt;==&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Not equal to&lt;/td&gt;
&lt;td&gt;!=&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bitwise AND&lt;/td&gt;
&lt;td&gt;&amp;amp;&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bitwise exclusive OR&lt;/td&gt;
&lt;td&gt;^&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logical AND&lt;/td&gt;
&lt;td&gt;&amp;amp;&amp;amp;&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conditional&lt;/td&gt;
&lt;td&gt;?:&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Assignment&lt;/td&gt;
&lt;td&gt;=, *=, /=, %=, +=, -=, &amp;amp;=, ^=, =, &amp;lt;&amp;lt;=, &amp;gt;&amp;gt;=&lt;/td&gt;
&lt;td&gt;Left to Right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Comma&lt;/td&gt;
&lt;td&gt;,&lt;/td&gt;
&lt;td&gt;Right to Left&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>c</category>
    </item>
    <item>
      <title>C Programming Cheat Sheet</title>
      <dc:creator>Alpha_Edit</dc:creator>
      <pubDate>Wed, 31 Mar 2021 04:25:57 +0000</pubDate>
      <link>https://dev.to/alpha_edit/c-programming-cheat-sheet-3h4d</link>
      <guid>https://dev.to/alpha_edit/c-programming-cheat-sheet-3h4d</guid>
      <description>&lt;p&gt;Here is a Cheat Sheet for C Programming Language.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. About C Programming Language.
&lt;/h2&gt;

&lt;h4&gt;
  
  
  1.1 What is C Programming Language?
&lt;/h4&gt;

&lt;p&gt;C programming language was developed in 1972 by Dennis Ritchie at bell laboratories of AT&amp;amp;T (American Telephone &amp;amp; Telegraph), located in the U.S.A.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.2 Why was C programming language was developed?
&lt;/h4&gt;

&lt;p&gt;It was developed to overcome the problems of previous languages such as B, BCPL, etc. Initially, C language was developed to be used in UNIX operating system. It inherits many features of previous languages such as B and BCPL. &lt;/p&gt;

&lt;h4&gt;
  
  
  1.3 Features of C Programming Language.
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Structured language.&lt;/li&gt;
&lt;li&gt;General purpose language.&lt;/li&gt;
&lt;li&gt;Portability.&lt;/li&gt;
&lt;li&gt;Code Re-usability &amp;amp; Ability to customize and extend.&lt;/li&gt;
&lt;li&gt;Limited Number of Key Word.&lt;/li&gt;
&lt;li&gt;Mid-level programming language.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  1.4 C program Structure.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pre-processor directives
global declarations

main()
{
    local variable deceleration
    statement sequences
    function invoking
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  1.5 C Keywords
&lt;/h4&gt;

&lt;p&gt;Keywords are the words whose meaning has already been explained to the C compiler. There are only 32 keywords available in C. The keywords are also called ‘Reserved words’. When the current programming language is C or C++, these keywords cannot be abbreviated, used as variable names, or used as any other type of identifiers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;auto        double      int         struct 
break       else        long        switch 
case        enum        register    typedef 
char        extern      return      union 
const       float       short       unsigned 
continue    for         signed      void 
default     goto        sizeof      volatile 
do          if          static      while
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  1.6 C Character Set
&lt;/h4&gt;

&lt;p&gt;The C character set consists of upper and lowercase alphabets, digits, special characters and white spaces, altogether called as the alphanumeric character. This can denotes any alphabet, digit or special symbol used to represent information. Following are the valid alphabets, numbers and special symbols allowed in C.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.7 Rules for Writing, Compiling and Executing the C program
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;C is case sensitive means variable named "COUNTER" is different from a variable named "counter".

&lt;ul&gt;
&lt;li&gt;All keywords are lower cased.&lt;/li&gt;
&lt;li&gt;Keywords cannot be used for any other purpose (like variable names).&lt;/li&gt;
&lt;li&gt;Every C statement must end with a ;. Thus ;acts as a statement terminator.&lt;/li&gt;
&lt;li&gt;First character must be an alphabet or underscore, no special symbol other than an underscore, no commas or blank spaces are allowed with in a variable, constant or keyword.&lt;/li&gt;
&lt;li&gt;Blank spaces may be inserted between two words to improve the readability of the statement. However, no blank spaces are allowed within a variable, constant or keyword.&lt;/li&gt;
&lt;li&gt;Variable must be declared before it is used in the program.&lt;/li&gt;
&lt;li&gt;File should be have the extension .c&lt;/li&gt;
&lt;li&gt;Program need to be compiled before execution.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  1.8 Data types &amp;amp; Placeholders
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;C has 5 basic built-in data types.&lt;/li&gt;
&lt;li&gt;Data type defines a set of values that a variable can store along with a set of operations that can be performed on it.&lt;/li&gt;
&lt;li&gt;A variable takes different values at different times.&lt;/li&gt;
&lt;li&gt;General form for declaring a variable is: &lt;code&gt;type name;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;An example for using variables comes below:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;main() 
{ 
    int sum; 
    sum=12; 
    sum=sum+5; 
    printf("Sum is %d",sum); 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;printf&lt;/code&gt; function will print the following:&lt;br&gt;
&lt;code&gt;Sum is 17&lt;/code&gt;&lt;br&gt;
In fact &lt;code&gt;%d&lt;/code&gt; is the placeholder for integer variable value that its name comes after double quotes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Common data types are:

&lt;ul&gt;
&lt;li&gt;int - integer&lt;/li&gt;
&lt;li&gt;char - character&lt;/li&gt;
&lt;li&gt;long - long integer&lt;/li&gt;
&lt;li&gt;float - float number&lt;/li&gt;
&lt;li&gt;double - long float&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Other placeholders are:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Placeholders        Format
%c                  Character
%d                  Signed decimal integer
%i                  Signed decimal integer
%e                  Scientific notation[e]
%E                  Scientific notation[E]
%f                  Decimal floating point
%o                  unsigned octal
%s                  String of character
%u                  unsigned decimal integer
%x                  unsigned Hexadecimal (lower)
%X                  unsigned Hexadecimal (upper)
%p                  dispaly a pointer
%%                  print a %
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  1.9 Control characters (Escape sequences)
&lt;/h4&gt;

&lt;p&gt;Certain non printing characters as well as the backslash () and the apostrophe('), can be expressed in terms of escape sequence.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;\a&lt;/code&gt; - Bell&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\n&lt;/code&gt; - New line&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\r&lt;/code&gt; - Carriage return&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\b&lt;/code&gt; - Backspace&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\f&lt;/code&gt; - Formfeed&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\t&lt;/code&gt; - Horizontal tab&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\"&lt;/code&gt; - Quotation mark&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\v&lt;/code&gt; - Vertical tab&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\'&lt;/code&gt; - Apostrophe&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\\&lt;/code&gt; - Backslash&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\?&lt;/code&gt; - Question mark&lt;/li&gt;
&lt;li&gt; &lt;code&gt;\0&lt;/code&gt; - Null&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  1.10 Receiving input values from keyboard
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;scanf&lt;/code&gt; function used to receiving input from keyboard.&lt;br&gt;
General form of &lt;code&gt;scanf&lt;/code&gt; function is :&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;scanf("Format string",&amp;amp;variable,&amp;amp;variable,...);&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Format&lt;/code&gt; string contains placeholders for variables that we intend to receive from keyboard. A &lt;code&gt;&amp;amp;&lt;/code&gt; sign comes before each variable name that comes in variable listing. Character strings are exceptions from this rule. They will not come with this sign before them.&lt;/p&gt;

&lt;p&gt;Note: You are not allowed to insert any additional characters in format string other than placeholders and some special characters. Entering even a space or other undesired character will cause your program to work incorrectly and the results will be unexpected. So make sure you just insert placeholder characters in scanf format string. The following example receives multiple variables from keyboard.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;float a; 
int n; 
scanf("%d%f",&amp;amp;n,&amp;amp;a);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pay attention that scanf function has no error checking capabilities built in it. Programmer is responsible for validating input data (type, range etc.) and preventing errors&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What browser do you use for programming?</title>
      <dc:creator>Alpha_Edit</dc:creator>
      <pubDate>Thu, 18 Mar 2021 03:59:41 +0000</pubDate>
      <link>https://dev.to/alpha_edit/what-browser-do-you-use-for-programming-6f8</link>
      <guid>https://dev.to/alpha_edit/what-browser-do-you-use-for-programming-6f8</guid>
      <description>&lt;p&gt;I use Firefox and Chrome.&lt;br&gt;
I am curious to know what browser do you use &lt;/p&gt;

</description>
      <category>discuss</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>Best Websites to find what technology the website is using</title>
      <dc:creator>Alpha_Edit</dc:creator>
      <pubDate>Tue, 09 Mar 2021 06:35:17 +0000</pubDate>
      <link>https://dev.to/alpha_edit/best-websites-to-find-what-technology-the-website-is-using-336m</link>
      <guid>https://dev.to/alpha_edit/best-websites-to-find-what-technology-the-website-is-using-336m</guid>
      <description>&lt;h5&gt;
  
  
  Have you ever been in a situation, where you need to find what tech the website is using to follow it?
&lt;/h5&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Here are the 2 websites which i use to find the tech the website is using
&lt;/h2&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;a href="https://whatcms.org"&gt;What Cms&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt; &lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F57ikcv0tos1qnsv6qkdl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F57ikcv0tos1qnsv6qkdl.png" alt="" width="790" height="570"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;br&gt;
This Website finds What Content Management system the website use or what hosting provider the website use or if the website use WordPress or Shopify, this can find the theme the website is using.&lt;br&gt;
 &lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;a href="https://w3techs.com/sites"&gt;W3 Techs&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4fmte66dx8d7zs1gow8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4fmte66dx8d7zs1gow8.png" alt="" width="613" height="168"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;br&gt;
This website gives information from the language used in the website and it is very useful when the website is not a CMS website.&lt;/p&gt;

&lt;p&gt;If you like this post make sure to hit the heart button, if you have any doubts about this post make sure to comment down the question&lt;/p&gt;

</description>
      <category>firstpost</category>
      <category>finder</category>
      <category>technology</category>
      <category>bestwebsite</category>
    </item>
  </channel>
</rss>
