<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4665277072092692580</id><updated>2024-11-08T21:08:27.825+05:30</updated><category term="1.1 Introduction to C Language"/><category term="1.2 Versions of C Language"/><category term="1.3 Features of C Language"/><category term="1.4 Limitations of C Language"/><category term="1.5 Usage of C Language"/><category term="2.1 Installing Dev C++ compiler"/><category term="2.1 Introduction to Dev C++ Compiler"/><category term="2.2 Working with Dev C Compiler"/><category term="2.2 Working with Dev C++ Compiler"/><category term="3.1 Introduction to C Tokens"/><category term="3.2 C Character Set"/><category term="3.3 Identifiers"/><category term="3.4 Keywords"/><category term="4.1 Introduction to C Data Types"/><category term="4.1.1 Integer Types"/><category term="4.1.2 Floating Point Types"/><category term="4.1.3 Character Types"/><category term="4.1.4 Void"/><category term="5.1 Introduction to C Variables"/><category term="5.1.1 Creating C Variables"/><category term="5.1.2 Scope of C Variables"/><category term="6.1 Introduction to C Constants"/><category term="6.1.1 Constant Literals"/><category term="6.1.2 Constant Variables"/><category term="7.1 C Program Development Life Cycle"/><category term="7.1.1 Structure of C Program"/><category term="7.1.2 Commenting"/><category term="8.1 Introduction to C Command Line Arguments"/><category term="9.1 Introduction to Flowchart"/><category term="9.1.1 Symbols of Flowchart"/><category term="9.1.2 Introduction to C Operators"/><category term="9.1.3 Arithmetic Operators"/><category term="9.1.4 Relational Operators"/><category term="9.1.5 Logical Operators"/><category term="9.1.6 Bitwise Operators"/><category term="9.1.7 Assignment Operators"/><category term="9.1.8 Increment/Decrements operators"/><category term="9.1.9 Conditional (?:) Operator"/><category term="9.2.1 Special C Operators"/><category term="9.3 Introduction to C Decision Making"/><category term="9.3.1 If Statement"/><category term="9.3.2 If-Else Statement"/><category term="9.3.3 else if"/><category term="9.3.4 Switch Statement"/><category term="Add Two Integers in C++."/><category term="Add a Checkbox widget in Python."/><category term="Add a Combo box widget in Python."/><category term="Add a Menu bar in Python"/><category term="Add a Progressbar widget in Python"/><category term="Add a ScrollView widget in Python."/><category term="Add a SpinBox in Python."/><category term="Add radio buttons widgets in Python."/><category term="Add two Binary Numbers in Java."/><category term="Adding a button widget in Python."/><category term="Addition of Two Number"/><category term="Android Activity Life cycle in"/><category term="Android App Sum of Two Number"/><category term="Android First Program"/><category term="Area of a triangle in Python"/><category term="Arithmetical operations in Python."/><category term="Armstrong Number in Python."/><category term="Armstrong Number or Not in C++."/><category term="Bubble sort in C."/><category term="Calculate Power of a Number in Java."/><category term="Calendar in Android."/><category term="Check Even or Odd in C++."/><category term="Check Even or Odd number in Java."/><category term="Check Leap Year in Java."/><category term="Check Leap Year in Python."/><category term="Check Prime Number in Python."/><category term="Check Whether an Alphabet is Vowel or Consonant in Java."/><category term="Check palindrome string using Java."/><category term="Compute Quotient and Remainder in Java."/><category term="Context Menu"/><category term="Count no of characters no. of lines &amp; no. of words in Lex Program."/><category term="Create First GUI application in Python."/><category term="Create a MessageBox in Python."/><category term="DES Algorithm in Python."/><category term="DES algorithm in C++."/><category term="Diffie-Hellman Key Exchange Method in C"/><category term="Diffie–Hellman Key Exchange Example in C++."/><category term="Diffie–Hellman Key Exchange Method."/><category term="Division of two number in C++."/><category term="Even or odd program in C"/><category term="Factorial Number in C++."/><category term="Factorial of a Number in Python."/><category term="Factorial of a number Enter  by user in Java."/><category term="Fibonacci sequence in Python."/><category term="Find ASCII Value of a character in Java."/><category term="Hamming distance in C."/><category term="Handle button click event in Python."/><category term="Hello World"/><category term="Hello World  in C++"/><category term="Hello World  in java."/><category term="Hill Cipher"/><category term="Hill cipher in Python"/><category term="Insertion Sort using C ."/><category term="Key generation in Simplified DES in C."/><category term="Largest Among Three Numbers in Python."/><category term="Largest Among three numbers using Java."/><category term="Lex Program to count number of words"/><category term="Lex program to count number of vowels and consonants"/><category term="Lex program to count the number of comment lines in a given C program."/><category term="Lex program to print out all HTML tags in file."/><category term="Lex program to print out all numbers from the given file."/><category term="Lex program which adds line numbers to the given file and display the same onto the standard output."/><category term="Menu List (Option Menu"/><category term="Menu List In Android."/><category term="Monoalphabetic cipher"/><category term="Monoalphabetic cipher in Python."/><category term="Multiplication Table in Python."/><category term="Multiply Two Numbers in Java."/><category term="Multiply two Floating Point Numbers in Java."/><category term="Next Prime number in C++."/><category term="Number is Odd or Even in Python."/><category term="Number is Positive and Negative or Zero in Python."/><category term="Palindrome or Not in C++."/><category term="Playfair cipher"/><category term="PopUp Menu) In Android."/><category term="Positive or Negative Number in C"/><category term="Print an Integer in C."/><category term="Print pyramid using # in C."/><category term="Python program to add two numbers."/><category term="Python program to print Hello World !"/><category term="RSA Algorithm Encryption and Decryption in C"/><category term="RSA Algorithm Encryption and Decryption in Python."/><category term="RSA Algorithm to C++"/><category term="Simple Calculator Android App Using Android Studio."/><category term="Simple Soring in C."/><category term="Subtraction of two number in C++."/><category term="Sum of Two Number in Java"/><category term="Sum of two numbers using Scanner in Java."/><category term="Swap Two Numbers Program in C++."/><category term="Swap Two Numbers in Java."/><category term="Swap two numbers without using third variable in C++."/><category term="Tic-Tac-Toe GUI in Python"/><category term="Tkinter textbox"/><category term="ToDo GUI Application"/><category term="Username and Password (login id and  password) in C."/><category term="Vowel or Consonan in C++."/><category term="addition subtraction multiplication and division"/><category term="swap two variables in Python."/><title type='text'>𝓜𝔂 𝓒𝓸𝓭𝓲𝓷𝓰 𝓑𝓵𝓸𝓬𝓴𝓼</title><subtitle type='html'>Coding Blocks in Python, C/C++, Java, and other popular programming languages with our easy to follow tutorials, examples, Easy Program in Languages.&#xa;Coding Blocks is a tutorials site for beginners that covers topics like Java, AWT, JSP, Servlet, JSTL, C, C++, DBMS, Perl, WordPress, SEO.&#xa;A popular programming and development in blog. Here you can learn C, C++, Java, Python, Android Development, PHP, SQL, JavaScript, .Net, etc.&#xa;C Programming, C++ Programming, Java Programming, Python Programming.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>141</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-8622041777894729271</id><published>2020-09-28T13:37:00.004+05:30</published><updated>2020-09-28T13:37:37.963+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hamming distance in C."/><title type='text'>Write a C program to find hamming distance. For example Hamming distance d(v1 ,v2)=3 if v 1=011011,v2=110001.</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;Hamming distance d(v1 ,v2)=3 if v 1=011011,v2=110001.&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;b&gt;Example :-&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &#39;Droid Sans Mono&#39;, &#39;monospace&#39;, monospace, &#39;Droid Sans Fallback&#39;; font-size: 20px; font-weight: normal; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;string.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; i,l1,l2,count&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;char&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;one&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;],&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;two&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Enter First String ::&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;scanf&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%s&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;one);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Enter Second String ::&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;scanf&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%s&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;two);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        l1&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;strlen&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(one);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        l2&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;strlen&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(two);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(l1&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;!=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;l2)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;Length of both strings must be same, enter again!&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(i&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;i&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;l1;i&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;                {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;one&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[i]&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;!=&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;two&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[i])&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;                {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;                    count&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;                }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;Hamming distance :-&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\t&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,count);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;span style=&quot;font-size: medium;&quot;&gt;OUTPUT&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &#39;Droid Sans Mono&#39;, &#39;monospace&#39;, monospace, &#39;Droid Sans Fallback&#39;; font-size: 20px; font-weight: normal; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;Enter First String ::&lt;br /&gt;Coding &lt;br /&gt;Enter Second String ::&lt;br /&gt;Blocks&lt;br /&gt;&lt;br /&gt;Hamming distance :- 6&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/8622041777894729271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Hamming-distance-in-C.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/8622041777894729271'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/8622041777894729271'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Hamming-distance-in-C.html' title='Write a C program to find hamming distance. For example Hamming distance d(v1 ,v2)=3 if v 1=011011,v2=110001.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-3241903696395323841</id><published>2020-09-28T13:29:00.001+05:30</published><updated>2020-09-28T13:29:09.757+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Calendar in Android."/><title type='text'>Write a program to create Calendar in Android.</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;Calendar in Android.&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;MainActivity.java&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;Fira Code&amp;quot;; font-size: 13.5pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;package &lt;/span&gt;com.example.sunny.calendar&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.content.Intent&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.support.v7.app.AppCompatActivity&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.Bundle&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.View&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.Button&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.TextView&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;MainActivity &lt;span style=&quot;color: #cc7832;&quot;&gt;extends &lt;/span&gt;AppCompatActivity {&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private &lt;/span&gt;TextView &lt;span style=&quot;color: #9876aa;&quot;&gt;thedate&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private &lt;/span&gt;Button &lt;span style=&quot;color: #9876aa;&quot;&gt;btngocalendar&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreate&lt;/span&gt;(Bundle savedInstanceState) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;setContentView(R.layout.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;activity_main&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;thedate &lt;/span&gt;= (TextView) findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;date&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;btngocalendar &lt;/span&gt;= (Button) findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;btngocalendar&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;Intent incoming = getIntent()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;String date = incoming.getStringExtra(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;date&quot;&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;thedate&lt;/span&gt;.setText(date)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;btngocalendar&lt;/span&gt;.setOnClickListener(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;View.OnClickListener() {&lt;br /&gt;            &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onClick&lt;/span&gt;(View v) {&lt;br /&gt;                Intent intent = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Intent(MainActivity.&lt;span style=&quot;color: #cc7832;&quot;&gt;this,&lt;/span&gt;Calendar.&lt;span style=&quot;color: #cc7832;&quot;&gt;class&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;startActivity(intent)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;        })&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Calendar.java&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Fira Code&#39;; font-size: 13.5pt;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;package &lt;/span&gt;com.example.sunny.calendar&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.content.Intent&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.support.v7.app.AppCompatActivity&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.Bundle&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.util.Log&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.CalendarView&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;Calendar &lt;span style=&quot;color: #cc7832;&quot;&gt;extends &lt;/span&gt;AppCompatActivity {&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private  static final &lt;/span&gt;String &lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;TAG &lt;/span&gt;= &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Calendar&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    private &lt;/span&gt;CalendarView &lt;span style=&quot;color: #9876aa;&quot;&gt;mCal&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreate&lt;/span&gt;(Bundle savedInstanceState) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;setContentView(R.layout.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;activity_calendar&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;mCal &lt;/span&gt;= (CalendarView) findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;calView&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;mCal&lt;/span&gt;.setOnDateChangeListener(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;CalendarView.OnDateChangeListener() {&lt;br /&gt;            &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onSelectedDayChange&lt;/span&gt;(CalendarView CalendarView&lt;span style=&quot;color: #cc7832;&quot;&gt;, int &lt;/span&gt;year&lt;span style=&quot;color: #cc7832;&quot;&gt;, int &lt;/span&gt;month&lt;span style=&quot;color: #cc7832;&quot;&gt;, int &lt;/span&gt;dayOfMonth) {&lt;br /&gt;                String date = year + &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;/&quot; &lt;/span&gt;+ month + &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;/&quot;&lt;/span&gt;+ dayOfMonth &lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;Log.&lt;span style=&quot;font-style: italic;&quot;&gt;d&lt;/span&gt;(&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;TAG&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;onSelectedDayChange: yyyy/mm/dd:&quot; &lt;/span&gt;+ date)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;Intent intent = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;Intent(Calendar.&lt;span style=&quot;color: #cc7832;&quot;&gt;this,&lt;/span&gt;MainActivity.&lt;span style=&quot;color: #cc7832;&quot;&gt;class&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;intent.putExtra(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;date&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;date)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;startActivity(intent)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;        })&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;activity_main.xml&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;Fira Code&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;RelativeLayout &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:background=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;#f5b041 &quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:context=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;TextView&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/cdate&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;120dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_alignParentTop=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_centerHorizontal=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginTop=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;215dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textColor=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot; #2e86c1 &quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Date&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textAlignment=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;center&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textSize=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;25dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:visibility=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;visible&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintBottom_toBottomOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintHorizontal_bias=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;0.0&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintLeft_toLeftOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintRight_toRightOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintTop_toTopOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintVertical_bias=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;0.219&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;Button&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/btncalendar&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;266dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;47dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_alignParentTop=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_centerHorizontal=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginTop=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;82dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Go to calendar&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_editor_absoluteX=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;47dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_editor_absoluteY=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;8dp&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/RelativeLayout&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;activity_calendar.xml&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;Fira Code&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;LinearLayout &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:background=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot; #f8c471 &quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:context=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;.Calendar&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;CalendarView&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/calView&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;wrap_content&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;AndroidManifest.xml&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;Fira Code&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;manifest &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;package=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;com.example.sunny.calendar&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;application&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:allowBackup=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:icon=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@mipmap/ic_launcher&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:label=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@string/app_name&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:roundIcon=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@mipmap/ic_launcher_round&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:supportsRtl=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:theme=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@style/AppTheme&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;activity &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:name=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;            &amp;lt;intent-filter&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;                &amp;lt;action &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:name=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;android.intent.action.MAIN&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;                &amp;lt;category &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:name=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;android.intent.category.LAUNCHER&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;            &amp;lt;/intent-filter&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;/activity&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;activity &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:name=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;.Calendar&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&amp;lt;/activity&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;/application&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&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/AVvXsEj9oIVnx0HVMg-RsaomIa-jWlpPX_4gEA2kjIcNbL-tNm21lFO1kCEIVv_5jqpwh6AxcwUcLn0YZuqBbQ78OqkyVCFpBXrE57kDY3gJe_m_VfesGBfUQGRru16xJoEHy5TECAgWZFwVhpM/s613/Calendar+in+Android+Studio.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Calendar in Android Studio&quot; border=&quot;0&quot; data-original-height=&quot;613&quot; data-original-width=&quot;308&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9oIVnx0HVMg-RsaomIa-jWlpPX_4gEA2kjIcNbL-tNm21lFO1kCEIVv_5jqpwh6AxcwUcLn0YZuqBbQ78OqkyVCFpBXrE57kDY3gJe_m_VfesGBfUQGRru16xJoEHy5TECAgWZFwVhpM/w201-h400/Calendar+in+Android+Studio.png&quot; title=&quot;Calendar in Android Studio&quot; width=&quot;201&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEiHFRxRfrDufaAxTwaeD0Jk2A8rhETz3CJDSika88NmJFfjrn-GrJtWaQMun6VT2I-KbmG8Or9KPaGMPLF325w39r3WubTPG6zSj4HaHN1LpicOZU4b-6-vY6uySYjdWByiFyNmbHUwpSc/s615/Calendar+in+Android+Studio1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Calendar in Android Studio&quot; border=&quot;0&quot; data-original-height=&quot;615&quot; data-original-width=&quot;314&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHFRxRfrDufaAxTwaeD0Jk2A8rhETz3CJDSika88NmJFfjrn-GrJtWaQMun6VT2I-KbmG8Or9KPaGMPLF325w39r3WubTPG6zSj4HaHN1LpicOZU4b-6-vY6uySYjdWByiFyNmbHUwpSc/w204-h400/Calendar+in+Android+Studio1.png&quot; title=&quot;Calendar in Android Studio&quot; width=&quot;204&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEhABSK4GHBeaWPyKHiR-mY4hlK0Uj45fjHvqAGX1He786-kcTvUJ3Y1p_6n_GLCQlUHaFPT00z4Zsln59UdK9NwlZUcqhWczbdu11ljnAsZe36Uz8Wv09eJKiCRpUkmU-d5SbidKFXenY0/s620/DeepinScreenshot_select-area_20200928132248.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Calendar in Android Studio&quot; border=&quot;0&quot; data-original-height=&quot;620&quot; data-original-width=&quot;313&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhABSK4GHBeaWPyKHiR-mY4hlK0Uj45fjHvqAGX1He786-kcTvUJ3Y1p_6n_GLCQlUHaFPT00z4Zsln59UdK9NwlZUcqhWczbdu11ljnAsZe36Uz8Wv09eJKiCRpUkmU-d5SbidKFXenY0/w203-h400/DeepinScreenshot_select-area_20200928132248.png&quot; title=&quot;Calendar in Android Studio&quot; width=&quot;203&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9oIVnx0HVMg-RsaomIa-jWlpPX_4gEA2kjIcNbL-tNm21lFO1kCEIVv_5jqpwh6AxcwUcLn0YZuqBbQ78OqkyVCFpBXrE57kDY3gJe_m_VfesGBfUQGRru16xJoEHy5TECAgWZFwVhpM/s613/Calendar+in+Android+Studio.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/3241903696395323841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Calendar-in-Android..html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/3241903696395323841'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/3241903696395323841'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Calendar-in-Android..html' title='Write a program to create Calendar in Android.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9oIVnx0HVMg-RsaomIa-jWlpPX_4gEA2kjIcNbL-tNm21lFO1kCEIVv_5jqpwh6AxcwUcLn0YZuqBbQ78OqkyVCFpBXrE57kDY3gJe_m_VfesGBfUQGRru16xJoEHy5TECAgWZFwVhpM/s72-w201-h400-c/Calendar+in+Android+Studio.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-5118046965795772672</id><published>2020-09-17T13:00:00.004+05:30</published><updated>2020-09-17T13:16:05.700+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android First Program"/><title type='text'>How to Creaate Android First Program.</title><content type='html'>&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;604&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dyEJI7cvFTPCWi4269n_wEKQDYuBSkl8MnAejGCfcdCnsUHVuTbKpizlajktTPBh9nqqSBif61YgWdj3YLYzw&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/5118046965795772672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Android-First Program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/5118046965795772672'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/5118046965795772672'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Android-First Program.html' title='How to Creaate Android First Program.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-4182899974583047285</id><published>2020-09-14T11:58:00.001+05:30</published><updated>2020-09-14T11:58:25.473+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Print pyramid using # in C."/><title type='text'>Write a Program to print pyramid using # in C.</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Print pyramid using # in C.&lt;/h3&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;EXAMPLE :-&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &#39;Droid Sans Mono&#39;, &#39;monospace&#39;, monospace, &#39;Droid Sans Fallback&#39;; font-size: 20px; font-weight: normal; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;/* This is Pattern program using # in C */&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;/* Main function starts from here*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; i, j, rows;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;/* This statement will numer of rows message */&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Enter number of rows: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;scanf&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;rows);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;/* using for loop*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(i&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;; i&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;rows; &lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;i)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(j&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;; j&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;i; &lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;j)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;# &quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b&gt;OUTPUT &lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &#39;Droid Sans Mono&#39;, &#39;monospace&#39;, monospace, &#39;Droid Sans Fallback&#39;; font-size: 20px; font-weight: normal; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;Enter number of rows: 5&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;&lt;br /&gt;# &lt;br /&gt;# # &lt;br /&gt;# # # &lt;br /&gt;# # # # &lt;br /&gt;# # # # #&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/4182899974583047285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/print-pyramid-using--in-C..html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/4182899974583047285'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/4182899974583047285'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/print-pyramid-using--in-C..html' title='Write a Program to print pyramid using # in C.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-3462176024401225134</id><published>2020-09-12T12:27:00.003+05:30</published><updated>2020-09-12T12:27:48.518+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Context Menu"/><category scheme="http://www.blogger.com/atom/ns#" term="Menu List (Option Menu"/><category scheme="http://www.blogger.com/atom/ns#" term="PopUp Menu) In Android."/><title type='text'>Write a program to create Menu List (Option Menu,Context Menu,PopUp Menu) In Android. </title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;Menu List (Option Menu,Context Menu,PopUp Menu) In Android. &lt;/h3&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;b&gt;Step :-1 Create New Project&lt;/b&gt;&lt;u&gt;&lt;b&gt;&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Step : -&lt;/b&gt;&lt;b&gt;2 Create New &lt;span style=&quot;color: #073763;&quot;&gt;menu.xml&lt;/span&gt; file&lt;/b&gt;&lt;u&gt;&lt;b&gt; &lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;MainActivity.java&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Fira Code&#39;; font-size: 11.3pt;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;package &lt;/span&gt;com.example.sunny.menus&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.support.v7.app.AppCompatActivity&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.Bundle&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.ActionMode&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.Menu&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.MenuInflater&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.MenuItem&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.View&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.PopupMenu&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.TextView&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.Toast&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;MainActivity &lt;span style=&quot;color: #cc7832;&quot;&gt;extends &lt;/span&gt;AppCompatActivity &lt;span style=&quot;color: #cc7832;&quot;&gt;implements &lt;/span&gt;PopupMenu.OnMenuItemClickListener {&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private &lt;/span&gt;ActionMode &lt;span style=&quot;color: #9876aa;&quot;&gt;actionMode&lt;/span&gt;=&lt;span style=&quot;color: #cc7832;&quot;&gt;null;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreate&lt;/span&gt;(Bundle savedInstanceState) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;setContentView(R.layout.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;activity_main&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;PopUpMenu&lt;/span&gt;(View v) {&lt;br /&gt;        PopupMenu popup = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;PopupMenu(&lt;span style=&quot;color: #cc7832;&quot;&gt;this, &lt;/span&gt;v)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;popup.setOnMenuItemClickListener(&lt;span style=&quot;color: #cc7832;&quot;&gt;this&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;popup.inflate(R.menu.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;menu&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;popup.show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;    &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public boolean &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreateOptionsMenu&lt;/span&gt;(Menu menu) {&lt;br /&gt;        MenuInflater inflater = getMenuInflater()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;inflater.inflate(R.menu.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;menu&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;menu)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;private &lt;/span&gt;ActionMode.Callback &lt;span style=&quot;color: #9876aa;&quot;&gt;actionModeCallback &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;ActionMode.Callback() {&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public boolean &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreateActionMode&lt;/span&gt;(ActionMode mode&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Menu menu) {&lt;br /&gt;            MenuInflater inflater = mode.getMenuInflater()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;inflater.inflate(R.menu.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;menu&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;menu)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public boolean &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onPrepareActionMode&lt;/span&gt;(ActionMode mode&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Menu menu) {&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;return false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public boolean &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onActionItemClicked&lt;/span&gt;(ActionMode mode&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;MenuItem item) {&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;switch &lt;/span&gt;(item.getItemId()) {&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;setting&lt;/span&gt;:&lt;br /&gt;                    Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(MainActivity.&lt;span style=&quot;color: #cc7832;&quot;&gt;this,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Clicked Setting&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_SHORT&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;mode.finish()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;logout&lt;/span&gt;:&lt;br /&gt;                    Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(MainActivity.&lt;span style=&quot;color: #cc7832;&quot;&gt;this,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Clicked Logout&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_SHORT&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;mode.finish()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                default&lt;/span&gt;:&lt;br /&gt;                    &lt;span style=&quot;color: #cc7832;&quot;&gt;return false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onDestroyActionMode&lt;/span&gt;(ActionMode mode) {&lt;br /&gt;            &lt;span style=&quot;color: #9876aa;&quot;&gt;actionMode &lt;/span&gt;= &lt;span style=&quot;color: #cc7832;&quot;&gt;null;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;    }&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    public  void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;ActionMode&lt;/span&gt;(View view){&lt;br /&gt;&lt;br /&gt;        TextView click=findViewById(R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;conttext_menu&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;click.setOnLongClickListener(&lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;View.OnLongClickListener() {&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;public boolean &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onLongClick&lt;/span&gt;(View view) {&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(&lt;span style=&quot;color: #9876aa;&quot;&gt;actionMode &lt;/span&gt;!= &lt;span style=&quot;color: #cc7832;&quot;&gt;null&lt;/span&gt;) {&lt;br /&gt;                    &lt;span style=&quot;color: #cc7832;&quot;&gt;return false;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;                &lt;span style=&quot;color: #9876aa;&quot;&gt;actionMode &lt;/span&gt;= MainActivity.&lt;span style=&quot;color: #cc7832;&quot;&gt;this&lt;/span&gt;.startActionMode(&lt;span style=&quot;color: #9876aa;&quot;&gt;actionModeCallback&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;view.setSelected(&lt;span style=&quot;color: #cc7832;&quot;&gt;true&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;}&lt;br /&gt;        })&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;menu.xml&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public boolean &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onOptionsItemSelected&lt;/span&gt;(MenuItem item) {&lt;br /&gt;        Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(&lt;span style=&quot;color: #cc7832;&quot;&gt;this, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Selected Item: &quot; &lt;/span&gt;+item.getTitle()&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_SHORT&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        switch &lt;/span&gt;(item.getItemId()) {&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;search_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;upload_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: grey;&quot;&gt;activity_main.xml&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;copy_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;print_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;share_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;bookmark_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            default&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;return super&lt;/span&gt;.onOptionsItemSelected(item)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public boolean &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onMenuItemClick&lt;/span&gt;(MenuItem item) {&lt;br /&gt;        Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(&lt;span style=&quot;color: #cc7832;&quot;&gt;this, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Selected Item: &quot; &lt;/span&gt;+item.getTitle()&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_SHORT&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        switch &lt;/span&gt;(item.getItemId()) {&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;search_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;upload_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: grey;&quot;&gt;activity_main.xml&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;copy_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;print_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;share_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;bookmark_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            default&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;return super&lt;/span&gt;.onOptionsItemSelected(item)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;activity_main.xml&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Fira Code&#39;; font-size: 11.3pt;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;RelativeLayout &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:background=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@drawable/menu2&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:context=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;Button&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/conttext_menu&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;150dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;83dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_alignParentStart=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_alignParentLeft=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_alignParentTop=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginStart=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;17dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginLeft=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;17dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginTop=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;233dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:onClick=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;ActionMode&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:background=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;#0080ff&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Context Menu&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textSize=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;20dp&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;Button&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/popup_menu&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;150dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;83dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_alignParentEnd=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_alignParentRight=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_alignParentBottom=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginEnd=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;20dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginRight=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;20dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_marginBottom=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;288dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:onClick=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;PopUpMenu&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:background=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;#0080ff&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Pop Up Menu&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textSize=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;20dp&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/RelativeLayout&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;menu.xml&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Fira Code&#39;; font-size: 11.3pt;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;menu &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Setting&quot; &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/setting&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;/item&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/logout&quot; &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Logout&quot; &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:showAsAction=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;never&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&amp;lt;/item&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/search_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Search&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/upload_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Upload&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/copy_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Copy&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/print_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Print&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/share_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Share&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/bookmark_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;BookMark&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/menu&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXcjiv0ANiE9xPu59JaaUq6SFvwFkG2ZFqfR7hLGtk4j98Gxe0f2HRzsxCilZ-d52bc4itzBvOCVXS1S4aDXvpquLt2vxt8gagyLYxKjLeMjOhQsSi9cFbw43E-gGg5wrxTTmWlxjqTic/s621/Android+Menu+Progarm+in+Android.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;621&quot; data-original-width=&quot;311&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXcjiv0ANiE9xPu59JaaUq6SFvwFkG2ZFqfR7hLGtk4j98Gxe0f2HRzsxCilZ-d52bc4itzBvOCVXS1S4aDXvpquLt2vxt8gagyLYxKjLeMjOhQsSi9cFbw43E-gGg5wrxTTmWlxjqTic/w200-h400/Android+Menu+Progarm+in+Android.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Android Menu Program in&amp;nbsp; Menu&lt;b&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/b&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt; &lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM75n85Bkia18A4E5pVt2owbSFn3mEIBzgYI42QJ4MQBuKCjwxDQ3fLrJ9TPiuOrtUE3XNi3GaW79-Wnl6rQtazfbil8xDC3fiIWUn_zS2LKPPIUF8ODyJXHKssusbDZ_Z26pnI-GPmQM/s619/Android+Menu+Program+on+Option+Menu.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;619&quot; data-original-width=&quot;315&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM75n85Bkia18A4E5pVt2owbSFn3mEIBzgYI42QJ4MQBuKCjwxDQ3fLrJ9TPiuOrtUE3XNi3GaW79-Wnl6rQtazfbil8xDC3fiIWUn_zS2LKPPIUF8ODyJXHKssusbDZ_Z26pnI-GPmQM/w204-h400/Android+Menu+Program+on+Option+Menu.png&quot; width=&quot;204&quot; /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Android Menu Program on Option Menu&lt;b&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&amp;nbsp;&lt;/b&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;After Click Option Menu Show......&lt;/b&gt;&lt;/p&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/AVvXsEiwxQHiLScS5uxulm1Kjq7Np0TyHg8M1Lp68gkexx3heD4_BtyZn3fEfBk1Br7lnc72PZncUJ7Suna7dSuHo6k3Ks37zsEaXZ0t4m-qd8VwTe_UUvqsE30aQoy7uR57G8_tyibI1Jnd_rQ/s622/Android+Menu+Program+on+Option+Menu-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;622&quot; data-original-width=&quot;313&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwxQHiLScS5uxulm1Kjq7Np0TyHg8M1Lp68gkexx3heD4_BtyZn3fEfBk1Br7lnc72PZncUJ7Suna7dSuHo6k3Ks37zsEaXZ0t4m-qd8VwTe_UUvqsE30aQoy7uR57G8_tyibI1Jnd_rQ/w201-h400/Android+Menu+Program+on+Option+Menu-1.png&quot; width=&quot;201&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Android Menu Program on Option Menu&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&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/AVvXsEhiD0LxQYHnW1HvIYyX-nO86fKqf4nzxGl7HzExUTLn2u2fCqMTcRQ_REUgPH_ElmX2t7LRMmyHjbZqErFAUMVHAq3ahpGN9U8wMx1lPNWyimXRRKkLUX78TefzERTMD57b8Qo3oj3eboA/s618/Android+Menu+Program+on+Context+Menu.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;618&quot; data-original-width=&quot;313&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiD0LxQYHnW1HvIYyX-nO86fKqf4nzxGl7HzExUTLn2u2fCqMTcRQ_REUgPH_ElmX2t7LRMmyHjbZqErFAUMVHAq3ahpGN9U8wMx1lPNWyimXRRKkLUX78TefzERTMD57b8Qo3oj3eboA/w203-h400/Android+Menu+Program+on+Context+Menu.png&quot; width=&quot;203&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;Android Menu Program on Context Menu&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;After Click Context Menu Show.........&lt;/b&gt;&lt;/p&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/AVvXsEgsyUwY-pV5ZZRk2uhlZggljCkUCR8xjoFlDGJg0jTTtKjYlnJ7Dml3DSC61BgP_f1I1SgtZOE0U9CM0kCTTgoc9OnC7wP8mEcaAkKC-8xDwyGrPLMPHCzI0y0nbTsSaBNLfdVG4Stynno/s615/Android+Menu+Program+in+PopUp+Menu.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;615&quot; data-original-width=&quot;309&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsyUwY-pV5ZZRk2uhlZggljCkUCR8xjoFlDGJg0jTTtKjYlnJ7Dml3DSC61BgP_f1I1SgtZOE0U9CM0kCTTgoc9OnC7wP8mEcaAkKC-8xDwyGrPLMPHCzI0y0nbTsSaBNLfdVG4Stynno/w201-h400/Android+Menu+Program+in+PopUp+Menu.png&quot; width=&quot;201&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;Android Menu Program on PopUp Menu&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&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/AVvXsEgz3SHsF2stfzSYiyL9UhEOQbWQNOtp9XbrN4zvnIz5go5eMYoTDbpqPn1OIh0s-YXhwIpGsvSGqIhuXgNC8W3JurtvqUdcPGmJI4UcZU-b5oswvBsr_7yrC9VN97tydKsRxW285GXUwdU/s618/Android+Menu+Program+on+Option+Menu_1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;618&quot; data-original-width=&quot;328&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz3SHsF2stfzSYiyL9UhEOQbWQNOtp9XbrN4zvnIz5go5eMYoTDbpqPn1OIh0s-YXhwIpGsvSGqIhuXgNC8W3JurtvqUdcPGmJI4UcZU-b5oswvBsr_7yrC9VN97tydKsRxW285GXUwdU/w213-h400/Android+Menu+Program+on+Option+Menu_1.png&quot; width=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Android Menu Program on PopUp Menu&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&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/AVvXsEjio3y7k1nCWz28khTdtlzN-i4sjMqZ_mmMRWz9Y83G9V0nhUN59UwufTrXW5UJBiBp5PT_hZMwx86lY8M0lk1ADSHeNoL4-vkPCPeTOgZEn2rxVaHVKJitXErBVueE3RwOeXRsQMeHsgY/s619/Android+Menu+Program+on+Option+Menu_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;619&quot; data-original-width=&quot;312&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjio3y7k1nCWz28khTdtlzN-i4sjMqZ_mmMRWz9Y83G9V0nhUN59UwufTrXW5UJBiBp5PT_hZMwx86lY8M0lk1ADSHeNoL4-vkPCPeTOgZEn2rxVaHVKJitXErBVueE3RwOeXRsQMeHsgY/w201-h400/Android+Menu+Program+on+Option+Menu_2.png&quot; width=&quot;201&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Android Menu Program on PopUp&amp;nbsp; Menu&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/3462176024401225134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Menu-List-Option-Menu-Context-Menu-PopUp-Menu-In-Android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/3462176024401225134'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/3462176024401225134'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Menu-List-Option-Menu-Context-Menu-PopUp-Menu-In-Android.html' title='Write a program to create Menu List (Option Menu,Context Menu,PopUp Menu) In Android. '/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXcjiv0ANiE9xPu59JaaUq6SFvwFkG2ZFqfR7hLGtk4j98Gxe0f2HRzsxCilZ-d52bc4itzBvOCVXS1S4aDXvpquLt2vxt8gagyLYxKjLeMjOhQsSi9cFbw43E-gGg5wrxTTmWlxjqTic/s72-w200-h400-c/Android+Menu+Progarm+in+Android.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-1127477651997081947</id><published>2020-09-11T12:27:00.003+05:30</published><updated>2020-09-11T12:27:27.633+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Menu List In Android."/><title type='text'>Write a program to create Menu List In Android.</title><content type='html'>&lt;h3 class=&quot;h3&quot; style=&quot;background-color: white; font-family: erdana, helvetica, arial, sans-serif; font-size: 21px; line-height: 1.3em;&quot;&gt;Android Option Menu Example&lt;/h3&gt;&lt;p&gt;&lt;b&gt;EXAMPLE :-&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;MainActivity.java&lt;/b&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Fira Code&#39;; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;package &lt;/span&gt;com.example.sunny.menu&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.support.v7.app.AppCompatActivity&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.Bundle&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.Menu&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.view.MenuItem&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.Toast&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;MainActivity &lt;span style=&quot;color: #cc7832;&quot;&gt;extends &lt;/span&gt;AppCompatActivity {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreate&lt;/span&gt;(Bundle savedInstanceState) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;setContentView(R.layout.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;activity_main&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;public boolean &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreateOptionsMenu&lt;/span&gt;(Menu menu) {&lt;br /&gt;        getMenuInflater().inflate(R.menu.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;options_menu&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;menu)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;    &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public boolean &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onOptionsItemSelected&lt;/span&gt;(MenuItem item) {&lt;br /&gt;        Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(&lt;span style=&quot;color: #cc7832;&quot;&gt;this, &lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Selected Item: &quot; &lt;/span&gt;+item.getTitle()&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_SHORT&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        switch &lt;/span&gt;(item.getItemId()) {&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;search_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;upload_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;copy_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;print_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;share_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            case &lt;/span&gt;R.id.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;bookmark_item&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: grey;&quot;&gt;// do your code&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;return true;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            default&lt;/span&gt;:&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;return super&lt;/span&gt;.onOptionsItemSelected(item)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;activity_main.xml&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Fira Code&#39;; font-size: 11.3pt;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;android.support.constraint.ConstraintLayout &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:background=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@drawable/menu&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:context=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;TextView&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;This Is Menu Program!&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textColor=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@color/green&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:textSize=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;30dp&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintBottom_toBottomOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintHorizontal_bias=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;0.495&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintLeft_toLeftOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintRight_toRightOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintTop_toTopOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintVertical_bias=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;0.478&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/android.support.constraint.ConstraintLayout&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;AndroidManifest.xml&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Fira Code&#39;; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;manifest &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;package=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;com.example.sunny.menu&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;application&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:allowBackup=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:icon=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@mipmap/ic_launcher&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:label=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@string/app_name&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:roundIcon=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@mipmap/ic_launcher_round&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:supportsRtl=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;true&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:theme=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@style/AppTheme&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;activity &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:name=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;            &amp;lt;intent-filter&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;                &amp;lt;action &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:name=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;android.intent.action.MAIN&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;                &amp;lt;category &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:name=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;android.intent.category.LAUNCHER&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;            &amp;lt;/intent-filter&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &amp;lt;/activity&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;/application&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;options_menu.xml&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Fira Code&#39;; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;menu &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/search_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Search&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/upload_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Upload&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/copy_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Copy&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/print_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Print&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/share_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Share&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;item &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:id=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;@+id/bookmark_item&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:title=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;BookMark&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/menu&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;/p&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/AVvXsEgB_MQLH-bTEoQl78v8c76Srk-3BMB3O9TavxtAzmk0FPkqE11Q8DBPKzq-3Bqua9jinH1H5d_T4nnNO53QKegEgMEUi1P6-bAmR-8VFr9WgbefJvCB02hiAH1z1gvgp3LjEmcqCTaIsTc/s622/Menu+List+Android.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Menu List In Android.&quot; border=&quot;0&quot; data-original-height=&quot;622&quot; data-original-width=&quot;314&quot; height=&quot;500&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB_MQLH-bTEoQl78v8c76Srk-3BMB3O9TavxtAzmk0FPkqE11Q8DBPKzq-3Bqua9jinH1H5d_T4nnNO53QKegEgMEUi1P6-bAmR-8VFr9WgbefJvCB02hiAH1z1gvgp3LjEmcqCTaIsTc/w254-h500/Menu+List+Android.png&quot; title=&quot;Menu List In Android.&quot; width=&quot;254&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEj9jod9-A920x7yKO2Nw9KOUVFcEP6wExnbqiUvvVfslUOuUoBEOe6GQ7DjntjlhgyahCWlmGS0zQ8ftaZAapsTGJDmwOeISG8Ih6fDGWyR98wuxAK0fTPJL0Y0FxnUOnyl6uVAGlHfQXI/s615/Menu+List+Android+studio.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Menu List In Android.&quot; border=&quot;0&quot; data-original-height=&quot;615&quot; data-original-width=&quot;344&quot; height=&quot;500&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9jod9-A920x7yKO2Nw9KOUVFcEP6wExnbqiUvvVfslUOuUoBEOe6GQ7DjntjlhgyahCWlmGS0zQ8ftaZAapsTGJDmwOeISG8Ih6fDGWyR98wuxAK0fTPJL0Y0FxnUOnyl6uVAGlHfQXI/w280-h500/Menu+List+Android+studio.png&quot; title=&quot;Menu List In Android.&quot; width=&quot;280&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEiZ-xI3O5mN22BkTRn66DCRZavB8d9t2IZChk0fcoWOAmMOlB6zkK8vVRWwm9O7glyDkHR-m8mXUMrdTNQNefoc1D_XOKUt3bfjDoLbfOAr5YdNvhL3OeF4Vb3RwbZwdG7jogoZwOcIseQ/s625/Menu_List+Android.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Menu List In Android.&quot; border=&quot;0&quot; data-original-height=&quot;625&quot; data-original-width=&quot;344&quot; height=&quot;500&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ-xI3O5mN22BkTRn66DCRZavB8d9t2IZChk0fcoWOAmMOlB6zkK8vVRWwm9O7glyDkHR-m8mXUMrdTNQNefoc1D_XOKUt3bfjDoLbfOAr5YdNvhL3OeF4Vb3RwbZwdG7jogoZwOcIseQ/w275-h500/Menu_List+Android.png&quot; title=&quot;Menu List In Android.&quot; width=&quot;275&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/1127477651997081947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Menu-List-In-Android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/1127477651997081947'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/1127477651997081947'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Menu-List-In-Android.html' title='Write a program to create Menu List In Android.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB_MQLH-bTEoQl78v8c76Srk-3BMB3O9TavxtAzmk0FPkqE11Q8DBPKzq-3Bqua9jinH1H5d_T4nnNO53QKegEgMEUi1P6-bAmR-8VFr9WgbefJvCB02hiAH1z1gvgp3LjEmcqCTaIsTc/s72-w254-h500-c/Menu+List+Android.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-7471785859789117166</id><published>2020-09-09T11:33:00.001+05:30</published><updated>2020-09-09T11:33:09.633+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lex program to count the number of comment lines in a given C program."/><title type='text'>Write a Lex program to count the number of comment lines in a given C program.</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;Count the number of comment lines in a given C program using Lex&lt;/h3&gt;&lt;div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;b&gt;EXAMPLE :-&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;%{
int com=0;
%}
%%
&quot;/*&quot;[^\n]+&quot;*/&quot; {com++;fprintf(yyout, &quot; &quot;);}
%%

int yywrap(void){} 
int main()
{
printf(&quot;Write a C program find Comment line : \n&quot;);
yyout=fopen(&quot;Output&quot;, &quot;w&quot;);
yylex();
printf(&quot;Comment=%d\n&quot;,com);
return 0;
}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;sunny@sunny-PC:~/Desktop$ flex comment.l
sunny@sunny-PC:~/Desktop$ gcc lex.yy.c
sunny@sunny-PC:~/Desktop$ ./a.out&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;
Write a C program find Comment line : &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;
/* Write Hello World in C*/
#include &amp;lt;stdio.h&amp;gt;

/* Main function starts from here*/
int main() 
{
      /* This statement will print Hello World message */
      printf(“Hello World!”); 
      return 0;
}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Ctrl+d&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;
Comment=3&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/7471785859789117166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Lex-program-to-count-numbers-of-comment.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/7471785859789117166'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/7471785859789117166'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Lex-program-to-count-numbers-of-comment.html' title='Write a Lex program to count the number of comment lines in a given C program.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-5251666847666518841</id><published>2020-09-09T11:13:00.000+05:30</published><updated>2020-09-09T11:13:37.640+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lex program which adds line numbers to the given file and display the same onto the standard output."/><title type='text'>Write a Lex program which adds line numbers to the given file and display the same onto the standard output.</title><content type='html'>&lt;h3 style=&quot;background-color: white; border: 0px; clear: both; color: rgba(0, 0, 0, 0.84); font-family: Roboto, sans-serif; line-height: 1.2; margin: 0px 0px 15px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;LEX program to add line numbers to a given file&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;b&gt;EXAMPLE :-&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;b&gt;Create first file line.l or line.lex , and Create Second file line.java&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;b&gt;&lt;u&gt;line.l&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;
%{ 
int line_number = 1; 
%} 
line .*\n	 

%% 
{line} { printf(&quot;%10d %s&quot;, line_number++, yytext); } 
%% 

int yywrap(){} 

int main(int argc, char*argv[]) 
{ 
extern FILE *yyin; 

yyin = fopen(&quot;line.java&quot;,&quot;r&quot;); 
yylex(); 
return 0; 
} &lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;INPUT :-&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;line.java&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;class hello{  
    public static void main(String args[]){  
     System.out.println(&quot;Hello World !&quot;);  
    }  
}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;sunny@sunny-PC:~/Desktop$ flex line.l
sunny@sunny-PC:~/Desktop$ gcc lex.yy.c
sunny@sunny-PC:~/Desktop$ ./a.out
         1 class hello
         2 {  
         3     public static void main(String args[])
         4     {  
         5      System.out.println(&quot;Hello World !&quot;);  
         6     }  
&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;7&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;time datetime=&quot;2019-04-30T17:44:15+00:00&quot; style=&quot;background-color: white; border: 0px; color: grey; font-family: Roboto, sans-serif; font-size: 10.8px; margin: 0px; padding: 0px; position: relative; text-align: justify; top: -10px; vertical-align: baseline;&quot; title=&quot;Tuesday, April 30th, 2019 5:44:15 PM&quot;&gt;&lt;/time&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/5251666847666518841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Lex-program-add-line-numbers-given-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/5251666847666518841'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/5251666847666518841'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Lex-program-add-line-numbers-given-file.html' title='Write a Lex program which adds line numbers to the given file and display the same onto the standard output.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-3070066695549032497</id><published>2020-09-09T11:00:00.002+05:30</published><updated>2020-09-09T11:00:40.423+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lex program to print out all HTML tags in file."/><title type='text'>Write a Lex program to print out all HTML tags in file.</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;Print out all HTML tags in file in Lex&lt;/h3&gt;&lt;div&gt;&lt;b&gt;EXAMPLE :-&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Create first file&amp;nbsp; tag.l or tag.lex , and Create Second file tags.txt&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;tag.l&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;%{ 
%} 

%% 
&quot;&amp;lt;&quot;[^&amp;gt;]*&amp;gt; {printf(&quot;%s\n&quot;, yytext); }
. ; 
%%	 

int yywrap(){} 
	
int main(int argc, char*argv[]) 
{ 
	
	yyin=fopen(&quot;tags.txt&quot;,&quot;r&quot;); 
	yylex(); 
	return 0; 
}&lt;/span&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;INPUT :-&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;tags.txt&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&amp;lt;html&amp;gt;
&amp;lt;title&amp;gt; Html Tags &amp;lt;/title&amp;gt;
&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;h1&amp;gt; A smile is happiness you’ll find right under your nose. &amp;lt;/h1&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;sunny@sunny-PC:~/Desktop$ flex h.l
sunny@sunny-PC:~/Desktop$ gcc lex.yy.c
sunny@sunny-PC:~/Desktop$ ./a.out
&amp;lt;html&amp;gt;

&amp;lt;title&amp;gt;
&amp;lt;/title&amp;gt;

&amp;lt;head&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;h1&amp;gt;
&amp;lt;/h1&amp;gt;

&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/3070066695549032497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/print-out-all-HTML-tags-in-file-to-Lex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/3070066695549032497'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/3070066695549032497'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/print-out-all-HTML-tags-in-file-to-Lex.html' title='Write a Lex program to print out all HTML tags in file.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-539941836734807789</id><published>2020-09-09T10:49:00.001+05:30</published><updated>2020-09-09T11:01:36.255+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lex program to print out all numbers from the given file."/><title type='text'>Write a Lex program to print out all numbers from the given file.</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Print out all numbers from the given file in Lex Program.&lt;/h3&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;Create first file&amp;nbsp; Num.l or Num.lex , and Create Second file num.txt&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Num.l&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;%{
#include &amp;lt;stdio.h&amp;gt;
%}
%%
[0-9]+ { printf(&quot;%s\n&quot;, yytext); }
.|\n     ;
%%
int yywrap(void){} 

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

	yyin=fopen(&quot;num.txt&quot;,&quot;r&quot;); 
	yylex();
	return 0;
}&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;droid sans mono&amp;quot;, monospace, monospace, &amp;quot;droid sans fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;droid sans mono&amp;quot;, monospace, monospace, &amp;quot;droid sans fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;INPUT :-&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;num.txt&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;1
2
3
4
5
6
7
8
9
0&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;droid sans mono&amp;quot;, monospace, monospace, &amp;quot;droid sans fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;droid sans mono&amp;quot;, monospace, monospace, &amp;quot;droid sans fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;sunny@sunny-PC:~/Desktop$ flex num.l
sunny@sunny-PC:~/Desktop$ gcc lex.yy.c
sunny@sunny-PC:~/Desktop$ ./a.out
1
2
3
4
5
6
7
8
9
0&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;droid sans mono&amp;quot;, monospace, monospace, &amp;quot;droid sans fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;droid sans mono&amp;quot;, monospace, monospace, &amp;quot;droid sans fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/539941836734807789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/print-out-all-numbers-from-the-given-file-to-Lex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/539941836734807789'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/539941836734807789'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/print-out-all-numbers-from-the-given-file-to-Lex.html' title='Write a Lex program to print out all numbers from the given file.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-2574102369535704423</id><published>2020-09-06T14:27:00.007+05:30</published><updated>2020-09-06T14:37:11.202+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android Activity Life cycle in"/><title type='text'>Activity Lifecycle in Android with Source code.</title><content type='html'>&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;strong style=&quot;background-color: white; color: rgba(0, 0, 0, 0.75); font-family: verdana, helvetica, arial, sans-serif;&quot;&gt;&lt;a href=&quot;https://mycodingblocks.blogspot.com/2020/09/activity-lifecycle-in-android-with-source-code.html&quot;&gt;Android Activity Lifecycle&lt;/a&gt;&lt;/strong&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white;&quot;&gt;&amp;nbsp;is controlled by 7 methods of android.app.Activity class.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;The android Activity is the subclass of Context Theme Wrapper class.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;&lt;o:DocumentProperties&gt;&lt;o:Revision&gt;1&lt;/o:Revision&gt;&lt;o:Pages&gt;1&lt;/o:Pages&gt;&lt;o:Lines&gt;1&lt;/o:Lines&gt;&lt;o:Paragraphs&gt;1&lt;/o:Paragraphs&gt;&lt;/o:DocumentProperties&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;&lt;o:OfficeDocumentSettings&gt;&lt;/o:OfficeDocumentSettings&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;&lt;w:WordDocument&gt;&lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;&lt;w:DisplayHorizontalDrawingGridEvery&gt;0&lt;/w:DisplayHorizontalDrawingGridEvery&gt;&lt;w:DisplayVerticalDrawingGridEvery&gt;2&lt;/w:DisplayVerticalDrawingGridEvery&gt;&lt;w:DocumentKind&gt;DocumentNotSpecified&lt;/w:DocumentKind&gt;&lt;w:DrawingGridVerticalSpacing&gt;7.8 磅&lt;/w:DrawingGridVerticalSpacing&gt;&lt;w:PunctuationKerning&gt;&lt;/w:PunctuationKerning&gt;&lt;w:View&gt;Normal&lt;/w:View&gt;&lt;w:Compatibility&gt;&lt;w:DontGrowAutofit/&gt;&lt;w:BalanceSingleByteDoubleByteWidth/&gt;&lt;w:DoNotExpandShiftReturn/&gt;&lt;/w:Compatibility&gt;&lt;w:Zoom&gt;0&lt;/w:Zoom&gt;&lt;/w:WordDocument&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;&lt;w:LatentStyles DefLockedState=&quot;false&quot;  DefUnhideWhenUsed=&quot;true&quot;  DefSemiHidden=&quot;true&quot;  DefQFormat=&quot;false&quot;  DefPriority=&quot;99&quot;  LatentStyleCount=&quot;260&quot; &gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Normal&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;heading 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;heading 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;heading 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;heading 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;heading 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;heading 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;heading 7&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;heading 8&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;heading 9&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;index 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;index 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;index 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;index 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;index 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;index 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;index 7&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;index 8&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;index 9&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;toc 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;toc 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;toc 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;toc 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;toc 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;toc 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;toc 7&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;toc 8&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;toc 9&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Normal Indent&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;footnote text&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;annotation text&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;header&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;footer&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;index heading&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;caption&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;table of figures&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;envelope address&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;envelope return&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;footnote reference&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;annotation reference&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;line number&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;page number&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;endnote reference&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;endnote text&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;table of authorities&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;macro&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;toa heading&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Bullet&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Number&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Bullet 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Bullet 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Bullet 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Bullet 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Number 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Number 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Number 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Number 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Title&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Closing&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Signature&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Default Paragraph Font&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Body Text&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Body Text Indent&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Continue&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Continue 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Continue 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Continue 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Continue 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Message Header&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Subtitle&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Salutation&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Date&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Body Text First Indent&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Body Text First Indent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Note Heading&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Body Text 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Body Text 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Body Text Indent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Body Text Indent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Block Text&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Hyperlink&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;FollowedHyperlink&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Strong&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Emphasis&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Document Map&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Plain Text&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;E-mail Signature&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Normal (Web)&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;HTML Acronym&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;HTML Address&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;HTML Cite&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;HTML Code&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;HTML Definition&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;HTML Keyboard&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;HTML Preformatted&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;HTML Sample&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;HTML Typewriter&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;HTML Variable&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Normal Table&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;annotation subject&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;No List&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;1 / a / i&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;1 / 1.1 / 1.1.1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Article / Section&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Simple 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Simple 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Simple 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Classic 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Classic 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Classic 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Classic 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Colorful 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Colorful 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Colorful 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Columns 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Columns 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Columns 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Columns 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Columns 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Grid 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Grid 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Grid 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Grid 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Grid 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Grid 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Grid 7&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Grid 8&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table List 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table List 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table List 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table List 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table List 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table List 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table List 7&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table List 8&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table 3D effects 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table 3D effects 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table 3D effects 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Contemporary&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Elegant&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Professional&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Subtle 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Subtle 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Web 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Web 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Web 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Balloon Text&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Grid&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Table Theme&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Placeholder Text&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;No Spacing&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Shading&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light List&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Grid&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Dark List&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Shading&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful List&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Grid&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Shading Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light List Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Grid Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 1 Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 2 Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 1 Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;List Paragraph&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Quote&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Intense Quote&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 2 Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 1 Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 2 Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 3 Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Dark List Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Shading Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful List Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Grid Accent 1&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Shading Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light List Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Grid Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 1 Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 2 Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 1 Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 2 Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 1 Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 2 Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 3 Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Dark List Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Shading Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful List Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Grid Accent 2&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Shading Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light List Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Grid Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 1 Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 2 Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 1 Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 2 Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 1 Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 2 Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 3 Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Dark List Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Shading Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful List Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Grid Accent 3&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Shading Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light List Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Grid Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 1 Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 2 Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 1 Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 2 Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 1 Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 2 Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 3 Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Dark List Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Shading Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful List Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Grid Accent 4&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Shading Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light List Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Grid Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 1 Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 2 Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 1 Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 2 Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 1 Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 2 Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 3 Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Dark List Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Shading Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful List Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Grid Accent 5&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Shading Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light List Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Light Grid Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 1 Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Shading 2 Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 1 Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium List 2 Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 1 Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 2 Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Medium Grid 3 Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Dark List Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Shading Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful List Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;w:LsdException Locked=&quot;false&quot;  Priority=&quot;99&quot;  SemiHidden=&quot;false&quot;  Name=&quot;Colorful Grid Accent 6&quot; &gt;&lt;/w:LsdException&gt;
&lt;/w:LatentStyles&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt;
@font-face{
font-family:&quot;Times New Roman&quot;;
}

@font-face{
font-family:&quot;宋体&quot;;
}

@font-face{
font-family:&quot;SimSun&quot;;
}

@font-face{
font-family:&quot;Calibri&quot;;
}

@font-face{
font-family:&quot;SimSun&quot;;
}

@font-face{
font-family:&quot;Liberation Mono&quot;;
}

p.MsoNormal{
mso-style-name:Normal;
mso-style-parent:&quot;&quot;;
margin:0pt;
margin-bottom:.0001pt;
font-family:Calibri;
mso-fareast-font-family:SimSun;
mso-bidi-font-family:&#39;Times New Roman&#39;;
}

span.msoIns{
mso-style-type:export-only;
mso-style-name:&quot;&quot;;
text-decoration:underline;
text-underline:single;
color:blue;
}

span.msoDel{
mso-style-type:export-only;
mso-style-name:&quot;&quot;;
text-decoration:line-through;
color:red;
}

table.MsoNormalTable{
mso-style-name:&quot;Table Normal&quot;;
mso-style-parent:&quot;&quot;;
mso-style-noshow:yes;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-padding-alt:0.0000pt 5.4000pt 0.0000pt 5.4000pt;
mso-para-margin:0pt;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-family:&#39;Times New Roman&#39;;
font-size:10.0000pt;
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;
}

table.MsoTableGrid{
mso-style-name:&quot;Table Grid&quot;;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-padding-alt:0.0000pt 5.4000pt 0.0000pt 5.4000pt;
mso-border-top-alt:0.5000pt solid windowtext;
mso-border-left-alt:0.5000pt solid windowtext;
mso-border-bottom-alt:0.5000pt solid windowtext;
mso-border-right-alt:0.5000pt solid windowtext;
mso-border-insideh:0.5000pt solid windowtext;
mso-border-insidev:0.5000pt solid windowtext;
mso-para-margin:0pt;
mso-para-margin-bottom:.0001pt;
mso-pagination:none;
text-align:justify;
text-justify:inter-ideograph;
font-family:&#39;Times New Roman&#39;;
font-size:10.0000pt;
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;
}
@page{mso-page-border-surround-header:no;
	mso-page-border-surround-footer:no;}@page Section0{
}
div.Section0{page:Section0;}&lt;/style&gt;&lt;!--StartFragment--&gt;&lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-bottom-alt: 0.5000pt solid windowtext; mso-border-insideh: 0.5000pt solid windowtext; mso-border-insidev: 0.5000pt solid windowtext; mso-border-left-alt: 0.5000pt solid windowtext; mso-border-right-alt: 0.5000pt solid windowtext; mso-border-top-alt: 0.5000pt solid windowtext; mso-padding-alt: 0.0000pt 5.4000pt 0.0000pt 5.4000pt; mso-table-layout-alt: fixed; width: 486pt;&quot;&gt;&lt;tbody&gt;&lt;tr style=&quot;height: 38.7pt;&quot;&gt;&lt;td style=&quot;background: rgb(79, 129, 189); border-color: rgb(79, 129, 189) rgb(79, 129, 189) rgb(255, 255, 255); border-style: solid; border-width: 1pt 1pt 1.5pt; mso-border-bottom-alt: 1.5000pt solid rgb(255,255,255); mso-border-left-alt: 1.0000pt solid rgb(79,129,189); mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;mso-pagination: widow-orphan; text-align: left;&quot;&gt;&lt;span style=&quot;color: #e7e9eb; font-family: &#39;Liberation Mono&#39;; font-size: 20pt; mso-fareast-font-family: SimSun; mso-spacerun: &#39;yes&#39;;&quot;&gt;Method&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Liberation Mono&#39;; font-size: 20pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: white; font-family: &#39;Liberation Mono&#39;; font-size: 20pt; mso-fareast-font-family: SimSun;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;background: rgb(79, 129, 189); border-bottom: 1.5pt solid rgb(255, 255, 255); border-left: none; border-right: 1pt solid rgb(79, 129, 189); border-top: 1pt solid rgb(79, 129, 189); mso-border-bottom-alt: 1.5000pt solid rgb(255,255,255); mso-border-left-alt: none; mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: white; font-family: &#39;Liberation Mono&#39;; font-size: 20pt; mso-fareast-font-family: SimSun; mso-spacerun: &#39;yes&#39;;&quot;&gt;Description&lt;/span&gt;&lt;span style=&quot;color: white; font-family: &#39;Liberation Mono&#39;; font-size: 20pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 41pt;&quot;&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: 1pt solid rgb(79, 129, 189); border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: 1.0000pt solid rgb(79,129,189); mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.5000pt solid rgb(255,255,255); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;mso-pagination: widow-orphan; text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1f2326; font-family: &amp;quot;Liberation Mono&amp;quot;; font-size: 14pt; letter-spacing: 0pt;&quot;&gt;onCreate&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: none; border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: none; mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.5000pt solid rgb(255,255,255); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun; mso-spacerun: &#39;yes&#39;;&quot;&gt;called when activity is first created.&lt;/span&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33.05pt;&quot;&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: 1pt solid rgb(79, 129, 189); border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: 1.0000pt solid rgb(79,129,189); mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;mso-pagination: widow-orphan; text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #1f2326; font-family: &amp;quot;Liberation Mono&amp;quot;; font-size: 14pt;&quot;&gt;onStart&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #1f2326; font-family: &amp;quot;Liberation Mono&amp;quot;; font-size: 14pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: none; border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: none; mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun; mso-spacerun: &#39;yes&#39;;&quot;&gt;called when activity is becoming visible to the user.&lt;/span&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 40.6pt;&quot;&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: 1pt solid rgb(79, 129, 189); border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: 1.0000pt solid rgb(79,129,189); mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #1f2326; font-family: &amp;quot;Liberation Mono&amp;quot;; font-size: 14pt;&quot;&gt;onResume&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #1f2326; font-family: &amp;quot;Liberation Mono&amp;quot;; font-size: 14pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: none; border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: none; mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun; mso-spacerun: &#39;yes&#39;;&quot;&gt;called when activity will start interacting with the user.&lt;/span&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 27.35pt;&quot;&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: 1pt solid rgb(79, 129, 189); border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: 1.0000pt solid rgb(79,129,189); mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #1f2326; font-family: &amp;quot;Liberation Mono&amp;quot;; font-size: 14pt;&quot;&gt;onPause&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: none; border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: none; mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun; mso-spacerun: &#39;yes&#39;;&quot;&gt;called when activity is not visible to the user.&lt;/span&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33.05pt;&quot;&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: 1pt solid rgb(79, 129, 189); border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: 1.0000pt solid rgb(79,129,189); mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #1f2326; font-family: &amp;quot;Liberation Mono&amp;quot;; font-size: 14pt;&quot;&gt;onStop&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: none; border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: none; mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun; mso-spacerun: &#39;yes&#39;;&quot;&gt;called when activity is no longer visible to the user.&lt;/span&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33.05pt;&quot;&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: 1pt solid rgb(79, 129, 189); border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: 1.0000pt solid rgb(79,129,189); mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #1f2326; font-family: &amp;quot;Liberation Mono&amp;quot;; font-size: 14pt;&quot;&gt;onRestart&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: none; border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: none; mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun; mso-spacerun: &#39;yes&#39;;&quot;&gt;called after your activity is stopped, prior to start.&lt;/span&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 28.15pt;&quot;&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: 1pt solid rgb(79, 129, 189); border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: 1.0000pt solid rgb(79,129,189); mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #1f2326; font-family: &amp;quot;Liberation Mono&amp;quot;; font-size: 14pt;&quot;&gt;onDestroy&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;background: rgb(255, 255, 255); border-bottom: 1pt solid rgb(79, 129, 189); border-left: none; border-right: 1pt solid rgb(79, 129, 189); border-top: none; mso-border-bottom-alt: 1.0000pt solid rgb(79,129,189); mso-border-left-alt: none; mso-border-right-alt: 1.0000pt solid rgb(79,129,189); mso-border-top-alt: 1.0000pt solid rgb(79,129,189); padding: 0pt 5.4pt; width: 243pt;&quot; valign=&quot;top&quot; width=&quot;324&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun; mso-spacerun: &#39;yes&#39;;&quot;&gt;called before the activity is destroyed.&lt;/span&gt;&lt;span style=&quot;color: #1f2326; font-family: &#39;Liberation Mono&#39;; font-size: 14pt; mso-fareast-font-family: SimSun;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;!--EndFragment--&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;EXAMPLE :-&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;activity_mail.xml&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;fira code&amp;quot;; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xml version=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;1.0&quot; &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;encoding=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;android.support.constraint.ConstraintLayout &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:context=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;    &amp;lt;TextView&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_width=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_height=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;wrap_content&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:text=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Android Life Cycle Program!&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintBottom_toBottomOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintLeft_toLeftOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintRight_toRightOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;app&lt;/span&gt;&lt;span style=&quot;color: #bababa;&quot;&gt;:layout_constraintTop_toTopOf=&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;parent&quot; &lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #e8bf6a;&quot;&gt;&amp;lt;/android.support.constraint.ConstraintLayout&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;MainActivity.java&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;fira code&amp;quot;; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;package &lt;/span&gt;com.example.sunny.lifecycle&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.support.v7.app.AppCompatActivity&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.os.Bundle&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;android.widget.Toast&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public class &lt;/span&gt;MainActivity &lt;span style=&quot;color: #cc7832;&quot;&gt;extends &lt;/span&gt;AppCompatActivity {&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onCreate&lt;/span&gt;(Bundle savedInstanceState) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;setContentView(R.layout.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;activity_main&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(getApplicationContext()&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;onCreate Method Call&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                &lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_LONG&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onStart&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onStart()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(getApplicationContext()&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;onStart Method Call&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_LONG&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onRestart&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onRestart()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(getApplicationContext()&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;onRestart Method Call&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_LONG&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onPause&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onPause()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(getApplicationContext()&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;onPause Method Call&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_LONG&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onResume&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onResume()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(getApplicationContext()&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;onResume Method Call&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_LONG&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onStop&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onStop()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;           &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(getApplicationContext()&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;onStop Method Call&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_LONG&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;protected void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;onDestroy&lt;/span&gt;()&lt;br /&gt;        {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;super&lt;/span&gt;.onDestroy()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;            &lt;/span&gt;Toast.&lt;span style=&quot;font-style: italic;&quot;&gt;makeText&lt;/span&gt;(getApplicationContext()&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;onDestroy Method Call&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;                    &lt;/span&gt;Toast.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;LENGTH_LONG&lt;/span&gt;).show()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;}&lt;br /&gt; }&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&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/AVvXsEi79g64GaK0MzDiNaYFwvbiF_APH1KM0c7s2QoMHCOh3-38cHDTrAdu3GUS_pLHfUa44rx03fmK-W6rgwePg7CSs8G6Kbxy8mOl6YZP2pUn1C3pzyY-9Y4SM1Sbz_OycBQkjhRhPoHL5d4/s614/Android+Life+Cycle.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;614&quot; data-original-width=&quot;309&quot; height=&quot;625&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi79g64GaK0MzDiNaYFwvbiF_APH1KM0c7s2QoMHCOh3-38cHDTrAdu3GUS_pLHfUa44rx03fmK-W6rgwePg7CSs8G6Kbxy8mOl6YZP2pUn1C3pzyY-9Y4SM1Sbz_OycBQkjhRhPoHL5d4/w314-h625/Android+Life+Cycle.png&quot; width=&quot;314&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/2574102369535704423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/activity-lifecycle-in-android-with-source-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/2574102369535704423'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/2574102369535704423'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/activity-lifecycle-in-android-with-source-code.html' title='Activity Lifecycle in Android with Source code.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi79g64GaK0MzDiNaYFwvbiF_APH1KM0c7s2QoMHCOh3-38cHDTrAdu3GUS_pLHfUa44rx03fmK-W6rgwePg7CSs8G6Kbxy8mOl6YZP2pUn1C3pzyY-9Y4SM1Sbz_OycBQkjhRhPoHL5d4/s72-w314-h625-c/Android+Life+Cycle.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-2143017007250321993</id><published>2020-09-02T12:43:00.003+05:30</published><updated>2020-09-02T12:43:35.056+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lex Program to count number of words"/><title type='text'>Write a Lex Program to count number of words.</title><content type='html'>&lt;b&gt;EXAMPLE :-&lt;/b&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;
%{ 
#include&amp;lt;stdio.h&amp;gt; 
#include&amp;lt;string.h&amp;gt; 
int s = 0; 
%} 

%% 
([a-zA-Z0-9])* {s++;}

&quot;\n&quot; {printf(&quot;%d\n&quot;, s); s = 0;} 
%% 

int yywrap(void){} 
int main() 
{ 
	yylex(); 
	return 0; 
} &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;span style=&quot;color: #569cd6; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;span style=&quot;color: white; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;sunny@sunny-PC:~/Desktop$ flex nw.l
sunny@sunny-PC:~/Desktop$ gcc lex.yy.c
sunny@sunny-PC:~/Desktop$ ./a.out
Computer Science
 2&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;span style=&quot;color: #569cd6; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/2143017007250321993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Lex-Program-to-count-number-of-words.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/2143017007250321993'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/2143017007250321993'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/Lex-Program-to-count-number-of-words.html' title='Write a Lex Program to count number of words.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-4046957083538663425</id><published>2020-09-02T12:06:00.002+05:30</published><updated>2020-09-02T12:14:02.221+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lex program to count number of vowels and consonants"/><title type='text'> Write a Lex program to count number of vowels and consonants in a given input string.</title><content type='html'>&lt;b style=&quot;background-color: white; border: 0px; font-family: roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Step 1 :&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;- lex filename.l or lex filename.lex depending on the extension file is saved with&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: roboto, sans-serif; font-size: 16px;&quot; /&gt;&lt;b style=&quot;background-color: white; border: 0px; font-family: roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Step 2 :-&amp;nbsp;&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&amp;nbsp;gcc lex.yy.c&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: roboto, sans-serif; font-size: 16px;&quot; /&gt;&lt;b style=&quot;background-color: white; border: 0px; font-family: roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Step 3 :-&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&amp;nbsp;./a.out&lt;/span&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;u&gt;cv.l&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; white-space: pre;&quot;&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;%{ 
int vowel=0; 
int const =0; 
%} 
  
%% 
[aeiouAEIOU] {vowel++;} 
[a-zA-Z] {const++;} 
%% 
int yywrap(){} 
int main() 
{ 
    printf(&quot;Enter the string of Vowels and Consonents ::&quot;); 
    yylex(); 
    printf(&quot;Number of vowels are :  %d\n&quot;, vowel); 
    printf(&quot;Number of consonants are :  %d\n&quot;, const); 
    return 0; 
} &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; font-size: 20px; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white;&quot;&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;sunny@sunny-PC:~/Desktop$ flex cv.l
sunny@sunny-PC:~/Desktop$ gcc lex.yy.c
sunny@sunny-PC:~/Desktop$ ./a.out
Enter the string of Vowels and Consonents :: Peace begins with a smile&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;  press ctrl+d&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;
Number of vowels are:  9
Number of consonants are:  12&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/4046957083538663425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/count-number-of-vowels-and-consonants-in-a-given-input-string-to-lex-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/4046957083538663425'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/4046957083538663425'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/count-number-of-vowels-and-consonants-in-a-given-input-string-to-lex-program.html' title=' Write a Lex program to count number of vowels and consonants in a given input string.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-8083131685604194881</id><published>2020-09-02T11:42:00.006+05:30</published><updated>2020-09-02T12:24:53.804+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Count no of characters no. of lines &amp; no. of words in Lex Program."/><title type='text'>Create a Lexer to take input from text file and count no of characters, no. of lines &amp; no. of words.</title><content type='html'>&lt;p&gt;Count no of characters no. of lines &amp;amp; no. of words in Lex Program.&lt;/p&gt;&lt;p&gt;&lt;b style=&quot;background-color: white; border: 0px; font-family: roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Step 1 :&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;- lex filename.l or lex filename.lex depending on the extension file is saved with&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: roboto, sans-serif; font-size: 16px;&quot; /&gt;&lt;b style=&quot;background-color: white; border: 0px; font-family: roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Step 2 :-&amp;nbsp;&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&amp;nbsp;gcc lex.yy.c&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: roboto, sans-serif; font-size: 16px;&quot; /&gt;&lt;b style=&quot;background-color: white; border: 0px; font-family: roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Step 3 :-&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&amp;nbsp;./a.out&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;file.l&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;%{
#include&amp;lt;stdio.h&amp;gt;
int lines=0,words=0,char=0;
%}

%%
\n {lines++ ; words;}
[\t &#39; &#39;] words++;
[a-zA-Z] char++;
%%

int main()
{
      yyin=fopen(&quot;s.txt&quot; , &quot;r&quot;);
      yylex();
      printf(&quot;\n File Contents..\n&quot;);
      printf(&quot;\n\t%d Line&quot;,lines);
      printf(&quot;\n\t%d Words&quot;,words);
      printf(&quot;\n\t%d Characters&quot;,char);
      return 0;
}
int yywrap()
{
      return 1;
}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;INPUT :&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;s.txt&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;All our dreams can come true if we have the &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;courage to pursue them 
The secret of getting ahead is getting started&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;Mark Twain&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;sunny@sunny-PC:~/Desktop$ flex file.l
sunny@sunny-PC:~/Desktop$ gcc lex.yy.c
sunny@sunny-PC:~/Desktop$ ./a.out&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;
 File Contents..

	1 Line
	26 Words
	111 Characters&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/8083131685604194881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/input-from-text-file-and-count-no-of-characters-no-of-lines--no-of-words.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/8083131685604194881'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/8083131685604194881'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/input-from-text-file-and-count-no-of-characters-no-of-lines--no-of-words.html' title='Create a Lexer to take input from text file and count no of characters, no. of lines &amp; no. of words.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-3375767359518247262</id><published>2020-09-01T13:33:00.006+05:30</published><updated>2020-09-01T13:33:57.994+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="RSA Algorithm to C++"/><title type='text'>Implement RSA Algorithm Encryption and Decryption in C++.</title><content type='html'>&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;ul style=&quot;background-color: white; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 18px; line-height: 1.4; list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;b style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;&lt;a href=&quot;https://simple.wikipedia.org/wiki/RSA_algorithm&quot; style=&quot;color: #88863d; text-decoration-line: none;&quot;&gt;RSA&lt;/a&gt;&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;&amp;nbsp;(Rivest–Shamir–Adleman) is an&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;algorithm&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;&amp;nbsp;used by modern computers to encrypt and decrypt messages.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;It is an asymmetric cryptographic&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;algorithm&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;Asymmetric means that there are two different keys.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;This is also called public key cryptography, because one of the keys can be given to anyone.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 18px;&quot;&gt;EXAMPLE :-&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; font-family: &amp;quot;droid sans mono&amp;quot;, monospace, monospace, &amp;quot;droid sans fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div style=&quot;color: #d4d4d4; font-size: 20px;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4;&quot;&gt;&lt;div style=&quot;line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;math.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;using&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;namespace&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;std&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;gcd&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;a&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;b&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; s;&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #c586c0;&quot;&gt;while&lt;/span&gt;(&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;      s= a%b;&lt;/div&gt;&lt;div&gt;      &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(s==&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;      &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; b;&lt;/div&gt;&lt;div&gt;      a = b;&lt;/div&gt;&lt;div&gt;      b= s;&lt;/div&gt;&lt;div&gt;   }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;() {&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; x = &lt;span style=&quot;color: #b5cea8;&quot;&gt;3&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; y = &lt;span style=&quot;color: #b5cea8;&quot;&gt;5&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; n=x*y;&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; track;&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; phi= (x-&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;)*(y-&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; e=&lt;span style=&quot;color: #b5cea8;&quot;&gt;11&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  &lt;span style=&quot;color: #c586c0;&quot;&gt;while&lt;/span&gt;(e&amp;lt;phi) {&lt;/div&gt;&lt;div&gt;      track = &lt;span style=&quot;color: #dcdcaa;&quot;&gt;gcd&lt;/span&gt;(e,phi);&lt;/div&gt;&lt;div&gt;      &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(track==&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;         &lt;span style=&quot;color: #c586c0;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;      &lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;         e++;&lt;/div&gt;&lt;div&gt;   }&lt;/div&gt;&lt;div&gt;  &lt;/div&gt;&lt;div&gt;  &lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; d1=&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;/e;&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; d=&lt;span style=&quot;color: #dcdcaa;&quot;&gt;fmod&lt;/span&gt;(d1,phi);&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; message = &lt;span style=&quot;color: #b5cea8;&quot;&gt;13&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; c = &lt;span style=&quot;color: #dcdcaa;&quot;&gt;pow&lt;/span&gt;(message,e); &lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #569cd6;&quot;&gt;double&lt;/span&gt; m = &lt;span style=&quot;color: #dcdcaa;&quot;&gt;pow&lt;/span&gt;(c,d);&lt;/div&gt;&lt;div&gt;   &lt;/div&gt;&lt;div&gt;   c=&lt;span style=&quot;color: #dcdcaa;&quot;&gt;fmod&lt;/span&gt;(c,n);&lt;/div&gt;&lt;div&gt;   m=&lt;span style=&quot;color: #dcdcaa;&quot;&gt;fmod&lt;/span&gt;(m,n);&lt;/div&gt;&lt;div&gt;   cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Original Message = &quot;&lt;/span&gt;&amp;lt;&amp;lt;message;&lt;/div&gt;&lt;div&gt;   cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;x = &quot;&lt;/span&gt;&amp;lt;&amp;lt;x;&lt;/div&gt;&lt;div&gt;   cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;y = &quot;&lt;/span&gt;&amp;lt;&amp;lt;y;&lt;/div&gt;&lt;div&gt;   cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;n = xy = &quot;&lt;/span&gt;&amp;lt;&amp;lt;n;&lt;/div&gt;&lt;div&gt;   cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;phi = &quot;&lt;/span&gt;&amp;lt;&amp;lt;phi;&lt;/div&gt;&lt;div&gt;   cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;e = &quot;&lt;/span&gt;&amp;lt;&amp;lt;e;&lt;/div&gt;&lt;div&gt;   cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;d = &quot;&lt;/span&gt;&amp;lt;&amp;lt;d;&lt;/div&gt;&lt;div&gt;   cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Encrypted message = &quot;&lt;/span&gt;&amp;lt;&amp;lt;c;&lt;/div&gt;&lt;div&gt;   cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&amp;lt;&amp;lt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Decrypted message = &quot;&lt;/span&gt;&amp;lt;&amp;lt;m;&lt;/div&gt;&lt;div&gt;   &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-size: 20px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b style=&quot;background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 18px;&quot;&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;Original Message = 13
x = 3
y = 5
n = xy = 15
phi = 8
e = 11
d = 0.0909091
Encrypted message = 7
Decrypted message = 13&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/3375767359518247262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/RSA Algorithm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/3375767359518247262'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/3375767359518247262'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/RSA Algorithm.html' title='Implement RSA Algorithm Encryption and Decryption in C++.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-2705719890956717233</id><published>2020-09-01T13:12:00.001+05:30</published><updated>2020-09-01T13:12:03.757+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="RSA Algorithm Encryption and Decryption in C"/><title type='text'>Implement RSA Algorithm Encryption and Decryption in C</title><content type='html'>&lt;ul style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px; line-height: 1.4; list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;b style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;&lt;a href=&quot;https://simple.wikipedia.org/wiki/RSA_algorithm&quot; style=&quot;color: #88863d; text-decoration-line: none;&quot;&gt;RSA&lt;/a&gt;&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;&amp;nbsp;(Rivest–Shamir–Adleman) is an&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;algorithm&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;&amp;nbsp;used by modern computers to encrypt and decrypt messages.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;It is an asymmetric cryptographic&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;algorithm&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;Asymmetric means that there are two different keys.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222; font-size: 16px;&quot;&gt;This is also called public key cryptography, because one of the keys can be given to anyone.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;EXAMPLE :-&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;math.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;typedef &lt;span style=&quot;color: #569cd6;&quot;&gt;struct&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; d;&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; x;&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; y;&lt;/div&gt;&lt;div&gt;    }EE;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    EE &lt;span style=&quot;color: #dcdcaa;&quot;&gt;extended_euclid&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;a&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;b&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;    EE e1, e2, e3;&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (b == &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;            {&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e1.d&lt;/span&gt; = a;&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e1.x&lt;/span&gt; = &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e1.y&lt;/span&gt; = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; e1;&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;            {&lt;/div&gt;&lt;div&gt;                e2 = &lt;span style=&quot;color: #dcdcaa;&quot;&gt;extended_euclid&lt;/span&gt;(b, a % b);&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e3.d&lt;/span&gt; = &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e2.d&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e3.x&lt;/span&gt; = &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e2.y&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e3.y&lt;/span&gt; = &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e2.x&lt;/span&gt; - &lt;span style=&quot;color: #dcdcaa;&quot;&gt;floor&lt;/span&gt;(a / b) * &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e2.y&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; e3;&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;modulo&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;x&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;N&lt;/span&gt;){&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; (x % N + N) % N;&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;br /&gt;&lt;div&gt;            &lt;span style=&quot;color: #569cd6;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;decimal_to_binary&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;op1&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;pq&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;[]&lt;/span&gt;){&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; result, i = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;do&lt;/span&gt;&lt;/div&gt;&lt;div&gt;            {&lt;/div&gt;&lt;div&gt;                result = op1 % &lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;                op1 /= &lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #9cdcfe;&quot;&gt;pq&lt;/span&gt;[i] = result;&lt;/div&gt;&lt;div&gt;                    i++;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #c586c0;&quot;&gt;while&lt;/span&gt;(op1 &amp;gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;modular_exponentiation&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;a&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;b&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;n&lt;/span&gt;){&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; *bb;&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; count = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;, c = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;, d = &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;, i;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;        count = (&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt;) (&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(b)/&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt;)) + &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;        bb = (&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; *) &lt;span style=&quot;color: #dcdcaa;&quot;&gt;malloc&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;sizeof&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt;*) * count);&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #dcdcaa;&quot;&gt;decimal_to_binary&lt;/span&gt;(b, bb);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;        &lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt; (i = count - &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;; i &amp;gt;= &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;; i--)&lt;/div&gt;&lt;div&gt;            {&lt;/div&gt;&lt;div&gt;                c = &lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt; * c;&lt;/div&gt;&lt;div&gt;                d = (d*d) % n;&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;bb&lt;/span&gt;[i] == &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                    c = c + &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;                    d = (d*a) % n;&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;             }&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; d;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;get_d&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;e&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;phi1&lt;/span&gt;){&lt;/div&gt;&lt;div&gt;    EE Ee;&lt;/div&gt;&lt;div&gt;    Ee = &lt;span style=&quot;color: #dcdcaa;&quot;&gt;extended_euclid&lt;/span&gt;(e, phi1);&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;modulo&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;Ee.x&lt;/span&gt;, phi1);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;        &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;argc&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;char&lt;/span&gt;* &lt;span style=&quot;color: #9cdcfe;&quot;&gt;argv&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;[]&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;        {&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; p1, q1, phi1, n1, e1, d1, m1, c1;&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Enter the value of p1: &quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%d&quot;&lt;/span&gt;, &amp;amp;p1);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Enter the valeu of q1: &quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%d&quot;&lt;/span&gt;, &amp;amp;q1);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;            n1 = p1*q1;&lt;/div&gt;&lt;div&gt;            phi1 = (p1 - &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;) * (q1 - &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Enter the value of e: &quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%d&quot;&lt;/span&gt;, &amp;amp;e1);&lt;/div&gt;&lt;div&gt;            d1 = &lt;span style=&quot;color: #dcdcaa;&quot;&gt;get_d&lt;/span&gt;(e1, phi1);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Public Key: (n = %d, e = %d)&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;, n1, e1);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Private Key: (n = %d, d = %d)&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;, n1, d1);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Enter message to encrypt: &quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%d&quot;&lt;/span&gt;, &amp;amp;m1);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;            c1 = &lt;span style=&quot;color: #dcdcaa;&quot;&gt;modular_exponentiation&lt;/span&gt;(m1, e1, n1);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Encrypted message is: %d&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;, c1);&lt;/div&gt;&lt;div&gt;            m1 = &lt;span style=&quot;color: #dcdcaa;&quot;&gt;modular_exponentiation&lt;/span&gt;(c1, d1, n1);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Message is decrypted to %d&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;, m1);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px; text-align: center;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/div&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/AVvXsEhp-91ETP0IXdSUMVfPs7LoghxkNFExVLEaZsZs7Cx3BKiTzFatJO3Hi2C3Br54CaQe95vSYqowSVb2zaIP56t5nEXiL7xG2059QlGlw1UpOZOghgkWnswgQl-9obNXVznLi6uPl7WiJjg/s484/RSA+Alogorithm+Encryt+and+Decrypt.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;200&quot; data-original-width=&quot;484&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp-91ETP0IXdSUMVfPs7LoghxkNFExVLEaZsZs7Cx3BKiTzFatJO3Hi2C3Br54CaQe95vSYqowSVb2zaIP56t5nEXiL7xG2059QlGlw1UpOZOghgkWnswgQl-9obNXVznLi6uPl7WiJjg/w605-h250/RSA+Alogorithm+Encryt+and+Decrypt.png&quot; width=&quot;605&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/2705719890956717233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/RSA-Algorithm-to-C.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/2705719890956717233'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/2705719890956717233'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/RSA-Algorithm-to-C.html' title='Implement RSA Algorithm Encryption and Decryption in C'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp-91ETP0IXdSUMVfPs7LoghxkNFExVLEaZsZs7Cx3BKiTzFatJO3Hi2C3Br54CaQe95vSYqowSVb2zaIP56t5nEXiL7xG2059QlGlw1UpOZOghgkWnswgQl-9obNXVznLi6uPl7WiJjg/s72-w605-h250-c/RSA+Alogorithm+Encryt+and+Decrypt.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-1230895662104286638</id><published>2020-09-01T12:24:00.004+05:30</published><updated>2020-09-01T12:28:34.378+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="RSA Algorithm Encryption and Decryption in Python."/><title type='text'>Implement RSA Algorithm Encryption and Decryption in Python.</title><content type='html'>&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;&lt;a href=&quot;https://simple.wikipedia.org/wiki/RSA_algorithm&quot;&gt;RSA&lt;/a&gt;&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&amp;nbsp;(Rivest–Shamir–Adleman) is an&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;algorithm&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&amp;nbsp;used by modern computers to encrypt and decrypt messages.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;It is an asymmetric cryptographic&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;algorithm&lt;/b&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;Asymmetric means that there are two different keys.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;This is also called public key cryptography, because one of the keys can be given to anyone.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;EXAMPLE :-&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;dejavu sans mono&amp;quot;;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 11.3pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;import &lt;/span&gt;math&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;RSA ENCRYPTION/DECRYPTION&quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;*****************************************************&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: grey;&quot;&gt;# Input Prime Numbers&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;PLEASE ENTER THE &#39;x&#39; AND &#39;y&#39; VALUES BELOW:&quot;&lt;/span&gt;)&lt;br /&gt;x = &lt;span style=&quot;color: #8888c6;&quot;&gt;int&lt;/span&gt;(&lt;span style=&quot;color: #8888c6;&quot;&gt;input&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Enter a prime number for x: &quot;&lt;/span&gt;))&lt;br /&gt;y = &lt;span style=&quot;color: #8888c6;&quot;&gt;int&lt;/span&gt;(&lt;span style=&quot;color: #8888c6;&quot;&gt;input&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Enter a prime number for y: &quot;&lt;/span&gt;))&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;*****************************************************&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;def &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;prime_check&lt;/span&gt;(k):&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(k == &lt;span style=&quot;color: #6897bb;&quot;&gt;2&lt;/span&gt;):&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;return True&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    elif &lt;/span&gt;((k &amp;lt; &lt;span style=&quot;color: #6897bb;&quot;&gt;2&lt;/span&gt;) &lt;span style=&quot;color: #cc7832;&quot;&gt;or &lt;/span&gt;((k % &lt;span style=&quot;color: #6897bb;&quot;&gt;2&lt;/span&gt;) == &lt;span style=&quot;color: #6897bb;&quot;&gt;0&lt;/span&gt;)):&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;return False&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    elif &lt;/span&gt;(k &amp;gt; &lt;span style=&quot;color: #6897bb;&quot;&gt;2&lt;/span&gt;):&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;for &lt;/span&gt;i &lt;span style=&quot;color: #cc7832;&quot;&gt;in &lt;/span&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #6897bb;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;k):&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;if not &lt;/span&gt;(k % i):&lt;br /&gt;                &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;false&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;return True&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;check_x = prime_check(x)&lt;br /&gt;check_y = prime_check(y)&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;while &lt;/span&gt;(((check_x == &lt;span style=&quot;color: #cc7832;&quot;&gt;False&lt;/span&gt;) &lt;span style=&quot;color: #cc7832;&quot;&gt;or &lt;/span&gt;(check_y == &lt;span style=&quot;color: #cc7832;&quot;&gt;False&lt;/span&gt;))):&lt;br /&gt;    x = &lt;span style=&quot;color: #8888c6;&quot;&gt;int&lt;/span&gt;(&lt;span style=&quot;color: #8888c6;&quot;&gt;input&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Enter a prime number for x: &quot;&lt;/span&gt;))&lt;br /&gt;    y = &lt;span style=&quot;color: #8888c6;&quot;&gt;int&lt;/span&gt;(&lt;span style=&quot;color: #8888c6;&quot;&gt;input&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Enter a prime number for y: &quot;&lt;/span&gt;))&lt;br /&gt;    check_x = prime_check(x)&lt;br /&gt;    check_y = prime_check(y)&lt;br /&gt;&lt;br /&gt;n = x * y&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;RSA Modulus(n) is:&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;n)&lt;br /&gt;&lt;br /&gt;r = (x - &lt;span style=&quot;color: #6897bb;&quot;&gt;1&lt;/span&gt;) * (y - &lt;span style=&quot;color: #6897bb;&quot;&gt;1&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Eulers Toitent(r) is:&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;*****************************************************&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;def &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;egcd&lt;/span&gt;(e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r):&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;while &lt;/span&gt;(r != &lt;span style=&quot;color: #6897bb;&quot;&gt;0&lt;/span&gt;):&lt;br /&gt;        e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r = r&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;e % r&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;e&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;def &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;eugcd&lt;/span&gt;(e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r):&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;for &lt;/span&gt;i &lt;span style=&quot;color: #cc7832;&quot;&gt;in &lt;/span&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #6897bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r):&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;while &lt;/span&gt;(e != &lt;span style=&quot;color: #6897bb;&quot;&gt;0&lt;/span&gt;):&lt;br /&gt;            a&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;b = r // e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r % e&lt;br /&gt;            &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(b != &lt;span style=&quot;color: #6897bb;&quot;&gt;0&lt;/span&gt;):&lt;br /&gt;                &lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;%d = %d*(%d) + %d&quot; &lt;/span&gt;% (r&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;a&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;b))&lt;br /&gt;            r = e&lt;br /&gt;            e = b&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;def &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;eea&lt;/span&gt;(a&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;b):&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(a % b == &lt;span style=&quot;color: #6897bb;&quot;&gt;0&lt;/span&gt;):&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;(b&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6897bb;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6897bb;&quot;&gt;1&lt;/span&gt;)&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;else&lt;/span&gt;:&lt;br /&gt;        gcd&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;s&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;t = eea(b&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;a % b)&lt;br /&gt;        s = s - ((a // b) * t)&lt;br /&gt;        &lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;%d = %d*(%d) + (%d)*(%d)&quot; &lt;/span&gt;% (gcd&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;a&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;t&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;s&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;b))&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;(gcd&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;t&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;s)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;def &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;mult_inv&lt;/span&gt;(e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r):&lt;br /&gt;    gcd&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;s&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;_ = eea(e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r)&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(gcd != &lt;span style=&quot;color: #6897bb;&quot;&gt;1&lt;/span&gt;):&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;return None&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    else&lt;/span&gt;:&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(s &amp;lt; &lt;span style=&quot;color: #6897bb;&quot;&gt;0&lt;/span&gt;):&lt;br /&gt;            &lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;s=%d. Since %d is less than 0, &quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;                  &quot;s = s(modr), i.e., s=%d.&quot; &lt;/span&gt;% (s&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;s&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;s % r))&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;elif &lt;/span&gt;(s &amp;gt; &lt;span style=&quot;color: #6897bb;&quot;&gt;0&lt;/span&gt;):&lt;br /&gt;            &lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;s=%d.&quot; &lt;/span&gt;% (s))&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;s % r&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;for &lt;/span&gt;i &lt;span style=&quot;color: #cc7832;&quot;&gt;in &lt;/span&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #6897bb;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6897bb;&quot;&gt;1000&lt;/span&gt;):&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(egcd(i&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r) == &lt;span style=&quot;color: #6897bb;&quot;&gt;1&lt;/span&gt;):&lt;br /&gt;        e = i&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;The value of e is:&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;e)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;*****************************************************&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;RSA ALGORITHM:&quot;&lt;/span&gt;)&lt;br /&gt;eugcd(e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;END OF THE STEPS USED TO ACHIEVE EUCLID&#39;S ALGORITHM.&quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;*****************************************************&quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;RSA EXTENDED ALGORITHM:&quot;&lt;/span&gt;)&lt;br /&gt;d = mult_inv(e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;r)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;END OF THE STEPS USED TO ACHIEVE THE VALUE OF &#39;d&#39;.&quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;The value of d is:&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;d)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;*****************************************************&quot;&lt;/span&gt;)&lt;br /&gt;public = (e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;n)&lt;br /&gt;private = (d&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;n)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Private Key is:&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;private)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Public Key is:&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;public)&lt;br /&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;*****************************************************&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;def &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;encrypt&lt;/span&gt;(pub_key&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;n_text):&lt;br /&gt;    e&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;n = pub_key&lt;br /&gt;    x = []&lt;br /&gt;    &lt;span style=&quot;color: #72737a;&quot;&gt;m &lt;/span&gt;= &lt;span style=&quot;color: #6897bb;&quot;&gt;0&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6897bb;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;for &lt;/span&gt;i &lt;span style=&quot;color: #cc7832;&quot;&gt;in &lt;/span&gt;n_text:&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(i.isupper()):&lt;br /&gt;            m = &lt;span style=&quot;color: #8888c6;&quot;&gt;ord&lt;/span&gt;(i) - &lt;span style=&quot;color: #6897bb;&quot;&gt;65&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6897bb;&quot;&gt;            &lt;/span&gt;c = (m ** e) % n&lt;br /&gt;            x.append(c)&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;elif &lt;/span&gt;(i.islower()):&lt;br /&gt;            m = &lt;span style=&quot;color: #8888c6;&quot;&gt;ord&lt;/span&gt;(i) - &lt;span style=&quot;color: #6897bb;&quot;&gt;97&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6897bb;&quot;&gt;            &lt;/span&gt;c = (m ** e) % n&lt;br /&gt;            x.append(c)&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;elif &lt;/span&gt;(i.isspace()):&lt;br /&gt;            &lt;span style=&quot;color: #72737a;&quot;&gt;spc &lt;/span&gt;= &lt;span style=&quot;color: #6897bb;&quot;&gt;500&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6897bb;&quot;&gt;            &lt;/span&gt;x.append(&lt;span style=&quot;color: #6897bb;&quot;&gt;500&lt;/span&gt;)&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;x&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;def &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;decrypt&lt;/span&gt;(priv_key&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;c_text):&lt;br /&gt;    d&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;n = priv_key&lt;br /&gt;    txt = c_text.split(&lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;,&#39;&lt;/span&gt;)&lt;br /&gt;    x = &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;&#39;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #72737a;&quot;&gt;m &lt;/span&gt;= &lt;span style=&quot;color: #6897bb;&quot;&gt;0&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6897bb;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;for &lt;/span&gt;i &lt;span style=&quot;color: #cc7832;&quot;&gt;in &lt;/span&gt;txt:&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(i == &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;500&#39;&lt;/span&gt;):&lt;br /&gt;            x += &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39; &#39;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;else&lt;/span&gt;:&lt;br /&gt;            m = (&lt;span style=&quot;color: #8888c6;&quot;&gt;int&lt;/span&gt;(i) ** d) % n&lt;br /&gt;            m += &lt;span style=&quot;color: #6897bb;&quot;&gt;65&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6897bb;&quot;&gt;            &lt;/span&gt;c = &lt;span style=&quot;color: #8888c6;&quot;&gt;chr&lt;/span&gt;(m)&lt;br /&gt;            x += c&lt;br /&gt;    &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;x&lt;br /&gt;&lt;br /&gt;message = &lt;span style=&quot;color: #8888c6;&quot;&gt;input&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;You like Encrypted or Decrypted?&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;;&quot;&gt;&lt;span style=&quot;color: #6a8759;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;(Separate numbers with &#39;,&#39; for Decryption):&quot;&lt;/span&gt;)&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;dejavu sans mono&amp;quot;;&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Your Message is ::&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;message)&lt;br /&gt;&lt;br /&gt;choose = &lt;span style=&quot;color: #8888c6;&quot;&gt;input&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Type &#39;1&#39; for Encryption and &#39;2&#39; for Decryption.&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;if &lt;/span&gt;(choose == &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;1&#39;&lt;/span&gt;):&lt;br /&gt;    enc_msg = encrypt(public&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;message)&lt;br /&gt;    &lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Your Encrypted Message is:&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;enc_msg)&lt;br /&gt;    &lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Thank you for using the RSA Encryption Algorithm. Goodbye!&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;elif &lt;/span&gt;(choose == &lt;span style=&quot;color: #6a8759;&quot;&gt;&#39;2&#39;&lt;/span&gt;):&lt;br /&gt;    &lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Your Decrypted Message is:&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;decrypt(private&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;message))&lt;br /&gt;    &lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Thank you for using the RSA Encryption Algorithm. Goodbye!&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;else&lt;/span&gt;:&lt;br /&gt;    &lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;You entered the wrong option.&quot;&lt;/span&gt;)&lt;br /&gt;    &lt;span style=&quot;color: #8888c6;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Thank you for using the RSA Encryption Algorithm. Goodbye!&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; line-height: 27px; white-space: pre;&quot;&gt;&lt;div style=&quot;color: black; font-family: Sans; font-size: medium; white-space: normal;&quot;&gt;&lt;pre style=&quot;background-color: #2b2b2b;&quot;&gt;&lt;span style=&quot;color: white; font-family: DejaVu Sans Mono;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #2b2b2b;&quot;&gt;&lt;span style=&quot;color: white; font-family: DejaVu Sans Mono;&quot;&gt;RSA ENCRYPTION/DECRYPTION
*****************************************************
PLEASE ENTER THE &#39;x&#39; AND &#39;y&#39; VALUES BELOW:
Enter a prime number for x: 3
Enter a prime number for y: 5
*****************************************************
RSA Modulus(n) is: 15
Eulers Toitent(r) is: 8
*****************************************************
The value of e is: 999
*****************************************************
RSA ALGORITHM:
8 = 0*(999) + 8
999 = 124*(8) + 7
8 = 1*(7) + 1
END OF THE STEPS USED TO ACHIEVE EUCLID&#39;S ALGORITHM.
*****************************************************
RSA EXTENDED ALGORITHM:
1 = 8*(1) + (-1)*(7)
1 = 999*(-1) + (125)*(8)
s=-1. Since -1 is less than 0, s = s(modr), i.e., s=7.
END OF THE STEPS USED TO ACHIEVE THE VALUE OF &#39;d&#39;.
The value of d is: 7
*****************************************************
Private Key is: (7, 15)
Public Key is: (999, 15)
*****************************************************
You like Encrypted or Decrypted? (Separate numbers with &#39;,&#39; for Decryption):3,15,20,17,13
Your Message is :: 3,15,20,17,13
Type &#39;1&#39; for Encryption and &#39;2&#39; for Decryption.2
Your Decrypted Message is: MAFIH
Thank you for using the RSA Encryption Algorithm. Goodbye!&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #2b2b2b;&quot;&gt;&lt;span style=&quot;color: white; font-family: DejaVu Sans Mono;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/1230895662104286638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/ RSA-Algorithm-Encryption-and-Decryption-to-Python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/1230895662104286638'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/1230895662104286638'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/09/ RSA-Algorithm-Encryption-and-Decryption-to-Python.html' title='Implement RSA Algorithm Encryption and Decryption in Python.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-5962439449926202128</id><published>2020-08-31T13:35:00.005+05:30</published><updated>2020-08-31T13:35:46.711+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Insertion Sort using C ."/><title type='text'>Write a Program Insertion Sort using C .</title><content type='html'>&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Insertion sort is also a simple sorting technique and is best suited for small data sets. But it is not suitable for large data sets.&amp;nbsp;&lt;/li&gt;&lt;li&gt;but it is a better sorting technique than bubble sort and selection sort because the complexity of insertion sort is less than both.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;strong style=&quot;background-color: white; border: 0px; color: rgba(0, 0, 0, 0.84); font-family: Roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; text-align: center; vertical-align: baseline;&quot;&gt;Time Complexity&amp;nbsp;&lt;/strong&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;strong style=&quot;background-color: white; border: 0px; color: rgba(0, 0, 0, 0.84); font-family: Roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Best&amp;nbsp; [&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; border: 0px; color: rgba(0, 0, 0, 0.84); font-family: Roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Ω(n) ]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;strong style=&quot;background-color: white; border: 0px; color: rgba(0, 0, 0, 0.84); font-family: Roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Average&amp;nbsp; [&amp;nbsp;&lt;/strong&gt;&lt;/strong&gt;θ(n^2) ]&lt;/li&gt;&lt;li&gt;&lt;strong style=&quot;background-color: white; border: 0px; color: rgba(0, 0, 0, 0.84); font-family: Roboto, sans-serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Worst&amp;nbsp; [&amp;nbsp;&lt;/strong&gt;O(n^2) ]&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;h2 id=&quot;algorithm&quot; style=&quot;background-color: #f9fafc; box-sizing: border-box; font-family: euclid_circular_a, &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 24px; line-height: 36px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;Insertion Sort Algorithm&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; font-family: &amp;quot;Droid Sans Mono&amp;quot;, Inconsolata, Menlo, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 16px; margin-top: 0px; overflow: auto; padding: 16px;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;insertionSort(arr)
  mark first element as sorted
  for each unsorted element X
    &#39;extract&#39; the element X
    for j &amp;lt;- lastSortedIndex down to 0
      if current element j &amp;gt; X
        move sorted element to the right by 1
    break loop and insert X here
end insertionSort&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;EXAMPLE :-&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div style=&quot;font-size: 20px;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;Array&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;[]&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;size&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; i=&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;; i&amp;lt;size; i++)&lt;/div&gt;&lt;div&gt;            {&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%d &quot;&lt;/span&gt;,&lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[i]);&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;insertionSort&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;[]&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;size&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; step=&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;; step&amp;lt;size; step++)&lt;/div&gt;&lt;div&gt;            {&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; key = &lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[step];&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; j=step-&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #c586c0;&quot;&gt;while&lt;/span&gt;(key&amp;lt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[j] &amp;amp;&amp;amp; j&amp;gt;=&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;            {&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[j+&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;] = &lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[j];&lt;/div&gt;&lt;div&gt;                    --j;&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[j+&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;]=key;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;(){&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; data&lt;span style=&quot;color: #569cd6;&quot;&gt;[]&lt;/span&gt; = {&lt;span style=&quot;color: #b5cea8;&quot;&gt;90&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;50&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;14&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;24&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;20&lt;/span&gt;};&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; size = &lt;span style=&quot;color: #569cd6;&quot;&gt;sizeof&lt;/span&gt;(data)/&lt;span style=&quot;color: #569cd6;&quot;&gt;sizeof&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;data&lt;/span&gt;[&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;]);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;insertionSort&lt;/span&gt;(data, size);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Sorted array in Asending order :&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;***********************************&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;Array&lt;/span&gt;(data, size);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div style=&quot;font-size: 20px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #ce9178; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #ce9178; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;Sorted array in Asending order :
***********************************
14 20 24 50 90 &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #ce9178; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/5962439449926202128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/Insertion-Sort-using-C-Program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/5962439449926202128'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/5962439449926202128'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/Insertion-Sort-using-C-Program.html' title='Write a Program Insertion Sort using C .'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-9024715007729272073</id><published>2020-08-31T13:15:00.002+05:30</published><updated>2020-08-31T13:15:32.719+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Simple Soring in C."/><title type='text'>Write a Program Simple Soring in C.</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;Simple Soring in C&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Sorting all the data of a data structure in a systematic order is called sorting. These are of two types, in ascending order or descending order.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The lowest value in ascending order is the store at the beginning of the Data List and the highest value at the end of the Data List, while the descending order has the opposite action.&amp;nbsp;&lt;/li&gt;&lt;li&gt;That is, the data of the highest value is the first and the data of the lowest value is the next store in the list.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;EXAMPLE :-&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;num&lt;/span&gt;[&lt;span style=&quot;color: #b5cea8;&quot;&gt;5&lt;/span&gt;], i ,j ,temp;&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt; (i = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;; i &amp;lt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;5&lt;/span&gt;; i++)&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                    &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Enter the Number :: %d : &quot;&lt;/span&gt;, (i+&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;));&lt;/div&gt;&lt;div&gt;                    &lt;span style=&quot;color: #dcdcaa;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%d&quot;&lt;/span&gt;, &amp;amp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;num&lt;/span&gt;[i]);&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt; (i = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;; i &amp;lt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;5&lt;/span&gt;; ++i)&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                    &lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt; (j = i + &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;; j &amp;lt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;5&lt;/span&gt;; ++j)&lt;/div&gt;&lt;div&gt;                        {&lt;/div&gt;&lt;div&gt;                            &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;num&lt;/span&gt;[i] &amp;gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;num&lt;/span&gt;[j])&lt;/div&gt;&lt;div&gt;                                {&lt;/div&gt;&lt;div&gt;                                    temp = &lt;span style=&quot;color: #9cdcfe;&quot;&gt;num&lt;/span&gt;[i];&lt;/div&gt;&lt;div&gt;                                    &lt;span style=&quot;color: #9cdcfe;&quot;&gt;num&lt;/span&gt;[i] = &lt;span style=&quot;color: #9cdcfe;&quot;&gt;num&lt;/span&gt;[j];&lt;/div&gt;&lt;div&gt;                                    &lt;span style=&quot;color: #9cdcfe;&quot;&gt;num&lt;/span&gt;[j] = temp;&lt;/div&gt;&lt;div&gt;                                }&lt;/div&gt;&lt;div&gt;                        }&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Sorting Order Array : &lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;****************************&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;                    &lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt; (i = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;; i &amp;lt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;5&lt;/span&gt;; ++i)&lt;/div&gt;&lt;div&gt;                        &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%d&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;num&lt;/span&gt;[i]);&lt;/div&gt;&lt;div&gt;                        &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;Enter the Number :: 1 : 90
Enter the Number :: 2 : 85
Enter the Number :: 3 : 45
Enter the Number :: 4 : 25
Enter the Number :: 5 : 77
Sorting Order Array : 
****************************
25
45
77
85
90&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 18px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/9024715007729272073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/Simple-Soring-to-C-Program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/9024715007729272073'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/9024715007729272073'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/Simple-Soring-to-C-Program.html' title='Write a Program Simple Soring in C.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-6532597088277848076</id><published>2020-08-31T12:56:00.001+05:30</published><updated>2020-08-31T13:15:49.343+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bubble sort in C."/><title type='text'>Write a Program of Bubble sort in C.</title><content type='html'>&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;This is the most common technique used in extreme use. In this, compare the first value of any Array to the second value of Array.&amp;nbsp;&lt;/li&gt;&lt;li&gt;If the second value of Array is greater than the first value, then the second data is placed in the first place and the first place&#39;s data in the second place to be arranged in ascending order.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Then compare the second value of Array to the third value and if the third value is larger than the second value, then the third value is replaced by the second value and the third value instead of the second value.&lt;/li&gt;&lt;li&gt;If the second value is not greater than the third value then no change is made in the location of the second and third values ​​of the Array.&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;background-color: #f9fafc; box-sizing: border-box; font-family: euclid_circular_a, &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 24px; line-height: 36px; margin: 0px 0px 12px; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;Bubble Sort Algorithm&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; font-family: &amp;quot;Droid Sans Mono&amp;quot;, Inconsolata, Menlo, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 16px; margin-top: 0px; overflow: auto; padding: 16px;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;bubbleSort(arr)
  for i &amp;lt;- 1 to indexOfLastUnsortedElement-1
    if leftElement &amp;gt; rightElement
      swap leftElement and rightElement
end bubbleSort&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;background-color: #f9fafc; box-sizing: border-box; font-family: euclid_circular_a, &amp;quot;Source Sans Pro&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 24px; line-height: 36px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;Optimized Bubble Sort&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; font-family: &amp;quot;Droid Sans Mono&amp;quot;, Inconsolata, Menlo, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, Courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 16px; margin-top: 0px; overflow: auto; padding: 16px;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;bubbleSort(array)
  swapped &amp;lt;- false
  for i &amp;lt;- 1 to indexOfLastUnsortedElement-1
    if leftElement &amp;gt; rightElement
      swap leftElement and rightElement
      swapped &amp;lt;- true
end bubbleSort
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;EXAMPLE :-&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #569cd6;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;swap&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; *&lt;span style=&quot;color: #9cdcfe;&quot;&gt;p1&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; *&lt;span style=&quot;color: #9cdcfe;&quot;&gt;p2&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;            {&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; temp = *p1;&lt;/div&gt;&lt;div&gt;                *p1 = *p2;&lt;/div&gt;&lt;div&gt;                *p2 = temp;&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #569cd6;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;bubbleSort&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;[]&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;n&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;                    {&lt;/div&gt;&lt;div&gt;                        &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; i, j;&lt;/div&gt;&lt;div&gt;                            &lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt; (i = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;; i &amp;lt; n-&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;; i++)&lt;/div&gt;&lt;div&gt;                                &lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt; (j = &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;; j &amp;lt; n-i-&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;; j++)&lt;/div&gt;&lt;div&gt;                                    &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[j] &amp;gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[j+&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;])&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #dcdcaa;&quot;&gt;swap&lt;/span&gt;(&amp;amp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[j], &amp;amp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[j+&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;]);&lt;/div&gt;&lt;div&gt;                    }&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #569cd6;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printArray&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;[]&lt;/span&gt;, &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;size&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;                    {&lt;/div&gt;&lt;div&gt;                        &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; i;&lt;/div&gt;&lt;div&gt;                            &lt;span style=&quot;color: #c586c0;&quot;&gt;for&lt;/span&gt; (i=&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;; i &amp;lt; size; i++)&lt;/div&gt;&lt;div&gt;                                &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%d &quot;&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[i]);&lt;/div&gt;&lt;div&gt;                                &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;n&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;                    }&lt;/div&gt;&lt;div&gt;                    &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;                        {&lt;/div&gt;&lt;div&gt;                            &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; arr&lt;span style=&quot;color: #569cd6;&quot;&gt;[]&lt;/span&gt; = {&lt;span style=&quot;color: #b5cea8;&quot;&gt;65&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;35&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;25&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;50&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;12&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;61&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;70&lt;/span&gt;};&lt;/div&gt;&lt;div&gt;                            &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; n = &lt;span style=&quot;color: #569cd6;&quot;&gt;sizeof&lt;/span&gt;(arr)/&lt;span style=&quot;color: #569cd6;&quot;&gt;sizeof&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;arr&lt;/span&gt;[&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;]);&lt;/div&gt;&lt;div&gt;                            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;bubbleSort&lt;/span&gt;(arr, n);&lt;/div&gt;&lt;div&gt;                            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Sorted array..... &lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;                            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printArray&lt;/span&gt;(arr, n);&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div style=&quot;font-size: 20px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #b5cea8; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #b5cea8; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;Sorted array..... 
12 25 35 50 61 65 70&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;span style=&quot;color: #b5cea8; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/6532597088277848076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/Bubble-sort-to-C-Program..html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/6532597088277848076'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/6532597088277848076'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/Bubble-sort-to-C-Program..html' title='Write a Program of Bubble sort in C.'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-3229230723457693409</id><published>2020-08-31T12:31:00.000+05:30</published><updated>2020-08-31T12:31:02.779+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="9.3.4 Switch Statement"/><title type='text'>9.3.4 Switch Statement</title><content type='html'>&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Switch Statement in C.&lt;/h3&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The switch statement is similar to if statement but case check is done instead of checking the condition.&amp;nbsp;&lt;/li&gt;&lt;li&gt;When you come to a particular case, you write the statements that you want to execute inside the case.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Case is matched to an integer variable.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The same case goes to the execute case which matches the integer variable&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Syntax :-&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; caseNumber = n;&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #c586c0;&quot;&gt;switch&lt;/span&gt;(caseNumber)&lt;/div&gt;&lt;div&gt;      {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #c586c0;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #6a9955;&quot;&gt;/* Statements to be executed if caseNumber is 1 */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;              &lt;span style=&quot;color: #c586c0;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #c586c0;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #6a9955;&quot;&gt;/* Statements to be executed if caseNumber is 2 */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;              &lt;span style=&quot;color: #c586c0;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #c586c0;&quot;&gt;default&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #6a9955;&quot;&gt;/* Statements to be executed if caseNumber is not 1 &amp;amp; 2 */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;              &lt;span style=&quot;color: #c586c0;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;      }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;When you set the caseNumber variable with an integer value and pass it in the switch statement, the same number that matches this number will be executed.&lt;/li&gt;&lt;li&gt;For example, if you have passed 2 in case number then the case of second number will execute and all statements before the break will be executed.&lt;/li&gt;&lt;li&gt;If a case does not match then the default case is execute.&amp;nbsp;&lt;/li&gt;&lt;li&gt;If after each case the break statement is used then all the cases will be executed.&lt;/li&gt;&lt;li&gt;You can also define the case with alphabets.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;EXAMPLE :-&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955; font-family: droid sans mono, monospace, monospace, droid sans fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955; font-family: droid sans mono, monospace, monospace, droid sans fallback;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;// Switch Statement in C.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; caseNumber;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Enter a number : &quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;scanf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;%d&quot;&lt;/span&gt;,&amp;amp;caseNumber);&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;/* Passing the case number to switch to execute desired case */&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;switch&lt;/span&gt;(caseNumber)&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;    {&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;      &lt;span style=&quot;color: #c586c0;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;:&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;          &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt; First Switch Case executed..&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;      &lt;span style=&quot;color: #c586c0;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt;:&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;          &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt; Second Switch Case executed..&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;      &lt;span style=&quot;color: #c586c0;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;3&lt;/span&gt;:&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;          &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt; Third Switch Case executed..&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;      &lt;span style=&quot;color: #c586c0;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;4&lt;/span&gt;:&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;          &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt; Fourth Switch Case executed..&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;      &lt;span style=&quot;color: #c586c0;&quot;&gt;default&lt;/span&gt;:&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;          &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt; You can only enter 1,2,3 and 4&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;            &lt;span style=&quot;color: #c586c0;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; white-space: pre;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; line-height: 27px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;Third Switch Case executed..&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; line-height: 27px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/3229230723457693409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/Switch-Statement-to-C-Program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/3229230723457693409'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/3229230723457693409'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/Switch-Statement-to-C-Program.html' title='9.3.4 Switch Statement'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-7117633518639184573</id><published>2020-08-31T11:42:00.002+05:30</published><updated>2020-08-31T11:42:14.548+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="9.3.3 else if"/><title type='text'>9.3.3 else if</title><content type='html'>&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;If you want to put another condition between if and else, then you can do it by defining another if block.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Syntax&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;droid sans mono&amp;quot;, monospace, monospace, &amp;quot;droid sans fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(expression)&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #6a9955;&quot;&gt;//execute your code&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(expression n)&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #6a9955;&quot;&gt;//execute your code&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #6a9955;&quot;&gt;//execute your code&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;EXAMPLE :-&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div style=&quot;font-size: 20px;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(sudoAge &amp;gt; bkAge)&lt;/div&gt;&lt;div&gt;  {&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Sudo is elder&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;  }&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #6a9955;&quot;&gt;/* one more condition checked using else if */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;  &lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(bkAge &amp;gt; sudoAge)&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;      &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Bk is elder&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;  &lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;      &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Both are equal&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;    } &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 20px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/7117633518639184573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/else-if-to-C-Program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/7117633518639184573'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/7117633518639184573'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/else-if-to-C-Program.html' title='9.3.3 else if'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-2807689812395388410</id><published>2020-08-27T13:00:00.000+05:30</published><updated>2020-08-27T13:00:15.687+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="9.3.2 If-Else Statement"/><title type='text'>9.3.2 If-Else Statement</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;If else statement is considered as part of an if statement.&amp;nbsp;&lt;/li&gt;&lt;li&gt;But else block and add to it.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The statement given in Else block is executed when the condition of if is false.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(condition)&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #6a9955;&quot;&gt;/* Statements to be executed when condition is true */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #6a9955;&quot;&gt;/* Statements to be executed when condition is false */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;As you know if the statements in if block are executed on if the condition is true.&amp;nbsp;&lt;/li&gt;&lt;li&gt;But you can also decide what to do if the condition is false.&amp;nbsp;&lt;/li&gt;&lt;li&gt;For this you use else block. This block always comes after the if block.&amp;nbsp;&lt;/li&gt;&lt;li&gt;These statements are written in this block, which will be executed if the condition is false.&amp;nbsp;&lt;/li&gt;&lt;li&gt;If if else statement is used in the above example then you can write it like this.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;div style=&quot;font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; sudoAge = &lt;span style=&quot;color: #b5cea8;&quot;&gt;25&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; bkAge = &lt;span style=&quot;color: #b5cea8;&quot;&gt;30&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #6a9955;&quot;&gt;/* Taking decision using if else statements */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(sudoAge &amp;gt; bkAge)&lt;/div&gt;&lt;div&gt;        {       &lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Sudo is elder:&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;            {&lt;/div&gt;&lt;div&gt;                &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Bk is elder:&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; line-height: 27px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #ce9178; font-size: medium;&quot;&gt;Bk is elder:&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/2807689812395388410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/If-Else-Statement-to-C-Program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/2807689812395388410'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/2807689812395388410'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/If-Else-Statement-to-C-Program.html' title='9.3.2 If-Else Statement'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-8846737204085712170</id><published>2020-08-27T12:42:00.004+05:30</published><updated>2020-08-27T12:42:49.246+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="9.3.1 If Statement"/><title type='text'>9.3.1 If Statement</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;If statement define a block by curly braces {}.&amp;nbsp;&lt;/li&gt;&lt;li&gt;When the condition is true then the statement given in this block is executed.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(condition)&lt;/div&gt;&lt;div&gt;        {&lt;/div&gt;&lt;div&gt;            &lt;span style=&quot;color: #6a9955;&quot;&gt;/* Statements to be executed if condition is true */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;If the condition is false then skip the entire block to the compiler.&amp;nbsp;&lt;/li&gt;&lt;li&gt;If the if statement is used in the above example, then the program can be written as&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div style=&quot;font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; sudoAge = &lt;span style=&quot;color: #b5cea8;&quot;&gt;22&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; bkAge = &lt;span style=&quot;color: #b5cea8;&quot;&gt;21&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #6a9955;&quot;&gt;/* Taking decision which variable holds bigger value using if statement */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(sudoAge &amp;gt; bkAge)&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        &lt;span style=&quot;color: #dcdcaa;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;sudo is elder&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;In the above example, a condition is used while using conditional operator.&amp;nbsp;&lt;/li&gt;&lt;li&gt;If the age of Sudo is greater than Bk then the printf () statement given in the if statement will execute.&amp;nbsp;&lt;/li&gt;&lt;li&gt;But if not, then this statement will not be executed.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1e1e1e; line-height: 27px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0; font-family: Droid Sans Mono, monospace, monospace, Droid Sans Fallback;&quot;&gt;&lt;span style=&quot;font-size: 20px; white-space: pre;&quot;&gt;sudo is elder&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; font-size: 20px; white-space: pre;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/8846737204085712170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/If-Statement-to-C-Program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/8846737204085712170'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/8846737204085712170'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/If-Statement-to-C-Program.html' title='9.3.1 If Statement'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4665277072092692580.post-6454516514342204220</id><published>2020-08-27T12:15:00.007+05:30</published><updated>2020-08-27T12:33:51.705+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="9.3 Introduction to C Decision Making"/><title type='text'>9.3 Introduction to C Decision Making</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;You can decide which statements you want to execute in your program and which statements you want to skip.&amp;nbsp;&lt;/li&gt;&lt;li&gt;This is called decision making.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Most decisions are done on a condition basis.&amp;nbsp;&lt;/li&gt;&lt;li&gt;When a particular condition arrives, you can execute the statements you want.&amp;nbsp;&lt;/li&gt;&lt;li&gt;For this, you use some built in statements.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Because these statements work with the conditions, they are also called conditional statements.&amp;nbsp;&lt;/li&gt;&lt;li&gt;And because they control execution in the statement program, they are also called control statements.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Suppose you want to print the name of any of the two students whose age is over.&lt;/li&gt;&lt;li&gt;How can you do this? See the program below.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: &amp;quot;Droid Sans Mono&amp;quot;, monospace, monospace, &amp;quot;Droid Sans Fallback&amp;quot;; line-height: 27px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;main&lt;/span&gt;()&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        sudoAge = &lt;span style=&quot;color: #b5cea8;&quot;&gt;22&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;        bkAge = &lt;span style=&quot;color: #b5cea8;&quot;&gt;21&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;In the above example, 2 students have been stored in age 2 variables.&amp;nbsp;&lt;/li&gt;&lt;li&gt;But you only have to print the age of the student whose age is the highest.&amp;nbsp;&lt;/li&gt;&lt;li&gt;In this situation you need to take a decision.&amp;nbsp;&lt;/li&gt;&lt;li&gt;You can do this by any &lt;a href=&quot;https://mycodingblocks.blogspot.com/2020/08/Introduction-to-C-Decision-Making.html&quot;&gt;decision making statement&lt;/a&gt; (If, If-else, Switch).&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mycodingblocks.blogspot.com/feeds/6454516514342204220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/Introduction-to-C-Decision-Making.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/6454516514342204220'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4665277072092692580/posts/default/6454516514342204220'/><link rel='alternate' type='text/html' href='https://mycodingblocks.blogspot.com/2020/08/Introduction-to-C-Decision-Making.html' title='9.3 Introduction to C Decision Making'/><author><name>My Coding Blocks</name><uri>http://www.blogger.com/profile/02694635616623785966</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECS7P5CJeVT4AS2qmkYC5rISCyDnTk6v93PEWpp7YwfHHjZYz4SXfe6mW3FmEBjFS7q95MjySONuufdGoJRF-KO2gfQbEomT0J8YAXVlCn4SzY5NWu1Y8OOot6WCwMBM/s141/pakata-goh-EJMTKCZ00I0-unsplash.jpg'/></author><thr:total>0</thr:total></entry></feed>