<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; Data Structures with C</title>
	<atom:link href="https://www.emblogic.com/blog/category/data-structures-with-c/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>what is the compilation process in c program.</title>
		<link>https://www.emblogic.com/blog/03/what-is-the-compilation-process-in-c-program/</link>
		<comments>https://www.emblogic.com/blog/03/what-is-the-compilation-process-in-c-program/#comments</comments>
		<pubDate>Tue, 03 Mar 2020 12:24:50 +0000</pubDate>
		<dc:creator><![CDATA[Ritik Sharma]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20933</guid>
		<description><![CDATA[Compilation process in C program There are four phases for a c program to be execute, 1.pre-processor 2.compiler 3.assembler 4.linker let’s start with the first one, #Pre-Processor- The pre-processor removes the comments and include header files in source code, replace &#8230; <a href="https://www.emblogic.com/blog/03/what-is-the-compilation-process-in-c-program/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="margin-bottom: 0in;line-height: 100%"><span style="text-decoration: underline"> <span style="font-size: xx-large"><i><b>Compilation process in C program </b></i></span></span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">There are four phases for a c program to be execute,</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">1.pre-processor</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">2.compiler</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">3.assembler</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">4.linker</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">let’s start with the first one, </span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><i><b>#P</b></i></span><span style="font-size: large"><i><b>re-</b></i></span><span style="font-size: large"><i><b>P</b></i></span><span style="font-size: large"><i><b>rocessor-</b></i></span> The pre-processor removes the comments and include header files in source code, replace macro name with code.</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">Basically, it is a program that processes its input data to produce output that can be used by another program as its input. Obviously, compiler is the next one,</span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><i><b>#Compiler- </b></i><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">A compiler is a program that processes your written data which is in your language convert into machine language i.e. </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">binary form(0 &amp;</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">1).</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">B</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">asically, it generates the assembly code of the file, it converts the (.i) file into the (.s) file. </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">Any file entering into compiler program </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">passes through lexical analysis, syntax analysis, intermediate code generation, code optimization, </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">object code generation. </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">And the next one is,</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><i><b>#Assembler- </b></i><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">An assembler is a program that converts assembly language </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">or assembly code</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal"> into machine code </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">or object code</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">. Assemblers are similar to compilers in that they produce executable code</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">s</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">. </span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">I</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">t converts the (.s) file into the (.o) file. Finally, the last one is,</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><i><b>#Linker- </b></i><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">A linker is a computer program that takes one or more object files generated by a compiler and combines them into one, executable program.</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">There are two types of linker i.e. static linking and dynamic linking.</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%"><span style="text-decoration: underline"> <span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">Static linking</span></span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">is the result of the linker copying all library routines used in the program into the executable image. </span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%"><span style="font-size: large"><span style="font-style: normal"><span style="text-decoration: underline"><span style="font-weight: normal">Dynamic linking </span></span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal"> is done during load or run-time and not when the exe is created. </span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">I</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">t converts the (.o) file into the executable file for example (.elf) file.</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">Now let’s create a simple program,</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">First we write our program in the vim editor* *(you can use any editor)</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">#include&lt;stdio.h&gt;</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">int main()</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">{</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">printf(“Hello, This is Ritik Sharma\n”);</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">return 0;</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">}</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">save the file with a name and (.c) extension </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">and then exit from the vim editor</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">now compile the file with the compiler for example gcc,</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">then execute the file which is ./a.out and you can see the output as given below,</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">Hello, This is Ritik Sharma</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">nice! You got the output. If any error occurred during compiling the program then note that error and try to correct th</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">at</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal"> error. </span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">_</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">THANK YOU_</span></span></span></span></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/what-is-the-compilation-process-in-c-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic of c language</title>
		<link>https://www.emblogic.com/blog/02/basic-of-c-language-2/</link>
		<comments>https://www.emblogic.com/blog/02/basic-of-c-language-2/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 07:20:07 +0000</pubDate>
		<dc:creator><![CDATA[Dhirendra chaurasia]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20924</guid>
		<description><![CDATA[Introduction to C:- C is a general purpose high level programming language used to develop portable applications and firmware. It is originally designed to develop system software and operating systems. C was invented by Dennis&#8217;s Ritchie at bell labs in &#8230; <a href="https://www.emblogic.com/blog/02/basic-of-c-language-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="margin-bottom: 0in;line-height: 100%"><b>Introduction to C:-</b></p>
<p style="margin-bottom: 0in;line-height: 100%">C is a general purpose high level programming language used to develop portable applications and firmware. It is originally designed to develop system software and operating systems. C was invented by Dennis&#8217;s Ritchie at bell labs in the 1972s. C has a primary application of Unix operating system. C have a main features low-level access to memory, simple set of keywords and clean style. Because of these features, this language is a suitable language for operating system development. After C, I follow the syntax of many developed language PHP, Java, Java script etc. C was initially used for system development work, particularly program of the system operating system. C was adopted a system language because it produce code that runs nearly as fast as the written code of assembly language.</p>
<p style="margin-bottom: 0in;line-height: 100%">Developing programs using c requires software called integrated development environment (IDE) such as turbo c, codeblocks, visiual studio etc. the integrated development environment mainly three <b>programs</b>:</p>
<p style="margin-bottom: 0in;line-height: 100%">1. Text editor 2. Compiler 3.Debugger.</p>
<p style="margin-bottom: 0in;line-height: 100%">1 .<b> Text editor </b>:- it is used to type of instructions of program which is called of source code. Source code is stored in c file.</p>
<p style="margin-bottom: 0in;line-height: 100%">2. <b>compiler</b>:- it is used to translate instructions of program into machine language which is called binary code.</p>
<p style="margin-bottom: 0in;line-height: 100%">3. <b>Debugger</b>:- it is used to find bugs(errors) within programs.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Keyword</b>:- keywords are p redefined word for performing various type of c. there are total 32 keywords</p>
<p style="margin-bottom: 0in;line-height: 100%">available in c. example :- char,float,int etc.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Variable</b>:- variable are new words created by us for storing data. Its value changes during execution programs. Example :-a,b,c, num, sum etc.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Constant</b>:- Constant refer to the fixed value of that does not change during execution of program. No matter where we use it in program, it meaning always remains same. Example :-5, 34.33, -71 etc.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Operator</b> :- symbols that are used to perform operations between variable are called operators. Example:- +,-,*, / = etc.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Application and Uses Language:-</b></p>
<p style="margin-bottom: 0in;line-height: 100%">C is mainly used to develop system software such as operating system, compiler etc. But it can also be used for developing and kind of application software such as commercial, scientific, games etc.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Advantage of C Language:-</b></p>
<p style="margin-bottom: 0in;line-height: 100%">1. C language is a building block for many other currently known language. C language has variety of data types and powerful operator. Due to this, program written in c language are efficient,fast and easy to understand.</p>
<p style="margin-bottom: 0in;line-height: 100%">2. C is highly portable language. This means that c programs written for one computer can easily run on another computer without any change or by doing a little change.</p>
<p style="margin-bottom: 0in;line-height: 100%">3. There are only 32 keywords in ANSI c and its strength in built in functions,several standard functions are available which can be used for developing program.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Disadvantage of C:-</b></p>
<p style="margin-bottom: 0in;line-height: 100%">1. C does not have concept of oops, that’s why c++ is developed.</p>
<p style="margin-bottom: 0in;line-height: 100%">2. there is no run time checking in c language.</p>
<p style="margin-bottom: 0in;line-height: 100%">3. there is no strict type checking.</p>
<p style="margin-bottom: 0in;line-height: 100%">4. C does not have the concept of name space.</p>
<p style="margin-bottom: 0in;line-height: 100%">5. C does not have the concept of constructor or destructor.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/basic-of-c-language-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gcc compilation process</title>
		<link>https://www.emblogic.com/blog/02/gcc-compilation-process-2/</link>
		<comments>https://www.emblogic.com/blog/02/gcc-compilation-process-2/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 06:41:37 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Rohilla]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20896</guid>
		<description><![CDATA[&#160; Gcc compiler Compilation Process: Any c file, a user wants to compile is not directly compiled. For example, there is c file having a name hello.c, this hello.c file is not directly provided to the compiler. Hello.c file first &#8230; <a href="https://www.emblogic.com/blog/02/gcc-compilation-process-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p style="margin-bottom: 0in;line-height: 100%" align="center"><span style="font-size: x-large"><span style="font-size: xx-large"><b>Gcc</b></span> <span style="font-size: xx-large"><b>compiler</b></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%" align="left"><span style="font-size: x-large"><b>Compilation Process:</b></span></p>
<p style="margin-bottom: 0in;line-height: 100%">Any c file, a user wants to compile is not directly compiled. For example, there is c file having a name hello.c, this hello.c file is not directly provided to the compiler. Hello.c file first of all provided to the gcc preprocessor , this preprocessor converts this hello.c file into hello.i file. This hello.i file consists of two file stdio.h and hello.c file. The combination these two files together makes a new file which is hello.c file . This hello.c file is provided to the gcc compiler. The gcc compiler is basically a two pass compiler which passes file two times . Then the file moves to the lexical analysis ,this lexical analysis breaks the content of file into tokens , then the tokens are provided to the syntax analysis which analysis all the tokens of file according to the c format ,this analysis gave us an errors ,saying that tokens used are appropriate or not .After the analysis process, file passes through the intermediate code generation, code optimization and object code generation. After the 2-pass compilation process, the format of file changes into different format which is in hello.s format .The output of the compiler is provided to the assembly, which is in the format of hello.s file. This hello.s file through assembly passes to the assembler. Assembler converts this hello.s file into hello.o file. This hello.o file passes through the symbol table, data segment and code segment process . After passing through these processes, file is provided to linker .The output of linker generates a new file named as a.out file which is in executable format. This executable file is then provided to the executable linkable format (elf), data segment and code segment.</p>
<p style="margin-bottom: 0in;line-height: 100%">After this whole process loader loads the file into the RAM. File spreads out in the ram. Ram is basically a process context (virtual address space content ) which consists of stack segment, file descripter, data segment and code segment. Stack segment consists of local variable of the file. File descripter consists of three ports 0,1,2 . These three ports are connected to the standard input, standard output and standard error respectively via stream. Stream is used for moving data wheather for input, output or for error. Standard input is used for entering the data to the port 0. standard output takes out the data from port 1. And standard error is to takes out the error from port 2. Data segment consists of various variables like global variable, static variable, extreme variable, register variable, volatile variable, constant variable, macros variable and preprocessor directive. Code segment consists of compiled code. Stack segment, file directive, data segment and code segment all these have some logical addresses.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/gcc-compilation-process-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiler process in &#8216;C&#8217;</title>
		<link>https://www.emblogic.com/blog/02/compiler-process-in-c/</link>
		<comments>https://www.emblogic.com/blog/02/compiler-process-in-c/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 06:35:15 +0000</pubDate>
		<dc:creator><![CDATA[Ayush Dhiman]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20872</guid>
		<description><![CDATA[Compiler is a software ,which is use for converting the code language to machine language. the c programe are work in 5 process- Preprocessor compiler assembler linker loader Preprocessor-In the preprocessor a preprocessor directive (#) and a header file (stdio.h) &#8230; <a href="https://www.emblogic.com/blog/02/compiler-process-in-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="color: #000000">Compiler is a software ,which is use for converting the code language to machine language.</p>
<p style="color: #000000">the c programe are work in 5 process-</p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">Preprocessor</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">compiler</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">assembler</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">linker</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">loader</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Preprocessor</b></span><span style="text-decoration: underline">-</span>In the preprocessor a preprocessor directive (#) and a header file (stdio.h)</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">int main() the programe are start for exicute.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">after that type a code &#8220;hello world&#8221; use c libraries.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and the last format is return 0; in this point the programe is success full exicute.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">after that this process the preprocessor also give a hello.i file.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">in hello.i file are include 2. files stdio.h+hello.c file.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Compiler</b></span><span style="text-decoration: underline">-</span>in this process the compiler are work in 2 pras.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">1.pras </span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">lexical analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">syntax analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">intermediate code genration</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">code optimization</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">the 1st pras process is create a symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">2. pras</span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">lexical analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">syntax analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">intermediate code genration</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">code optimization</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">object code genration</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and the 2nd pras is compile the code use symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and compiler create a &#8221; hello.s&#8221; file.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Lexical analysis</b></span>-in lexical process the code is break in tokken,</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">example- hello world  &#8211;&gt;h e l l o w o r l d. </span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Syntax analysis</b></span><span style="text-decoration: underline">-</span>in syntax process the cheak the code in right format.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">example (),:,&lt;,&gt;,&#8221;&#8221;&#8221;.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Intermediate code genration</b></span><b>-</b>in intermediate code genration process the code token also arrange in  highest priority order.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Code optimization</b></span>-in code optimization process the compiler also optimize code  and resolve  minor error.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Object code genration-</b></span>in object code genration process the compiler are genrate the full code in objective form.</span></span></p>
<p style="color: #000000"><span style="color: #000000"> <span style="font-family: Arial, Verdana">in this process the fully code also link of symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">in hello.s file, include &#8220;code,data segment,symbol table&#8221;.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Assembler</b></span>-   after the compiler process the code also convert in  assembly language.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and make a hello.o file in .o file include links,data ,code, refrence symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>linker</b></span><span style="text-decoration: underline">- </span>the linker process  also linked the code for c library and symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and make exicutable linkable format and output file-&gt; a.out.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">in this file stored in secondry memory .</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">programe  compiling process is complete</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Loader- </b></span>the programe exicutable linkable format file (secondry memory) to process context (primary memory) through loader.</span></span></p>
<p style="color: #000000">
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/compiler-process-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Function Pointer</title>
		<link>https://www.emblogic.com/blog/12/what-is-function-pointer/</link>
		<comments>https://www.emblogic.com/blog/12/what-is-function-pointer/#comments</comments>
		<pubDate>Thu, 29 Dec 2016 05:25:43 +0000</pubDate>
		<dc:creator><![CDATA[Shubham Gupta]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13820</guid>
		<description><![CDATA[A function pointer (or subroutine pointer or procedure pointer) is a type of pointer supported by third-generation programming languages (such as PL/I, COBOL, Fortran,[1] dBASE dBL, and C) and object-oriented programming languages (such as C++ and D).[2] Instead of referring &#8230; <a href="https://www.emblogic.com/blog/12/what-is-function-pointer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>A function pointer (or subroutine pointer or procedure pointer) is a type of pointer supported by third-generation programming languages (such as PL/I, COBOL, Fortran,[1] dBASE dBL, and C) and object-oriented programming languages (such as C++ and D).[2]</p>
<p>Instead of referring to data values, a function pointer points to executable code within memory. When dereferenced, a function pointer can be used to invoke the function it points to and pass its arguments just like a normal function call. Such an invocation is also known as an &#8220;indirect&#8221; call, because the function is being invoked indirectly through a variable instead of directly through a fixed name or address.</p>
<p>Function pointers can be used to simplify code by providing a simple way to select a function to execute based on run-time values.</p>
<p>The simplest implementation of a function (or subroutine) pointer is as a variable containing the address of the function within executable memory. Older third-generation languages such as PL/I and COBOL, as well as more modern languages such as Pascal and C generally implement function pointers in this manner.[3]</p>
<p>The following C program illustrates the use of two function pointers:</p>
<p>func1 takes one double-precision (double) parameter and returns another double, and is assigned to a function which converts centimetres to inches<br />
func2 takes a pointer to a constant character array as well as an integer and returns a pointer to a character, and is assigned to a string library function which returns a pointer to the first occurrence of a given character in a character array</p>
<p>#include   /* for printf */<br />
#include  /* for strchr */</p>
<p>double cm_to_inches(double cm) {<br />
	return cm / 2.54;<br />
}</p>
<p>int main(void) {<br />
	double (*func1)(double) = cm_to_inches;<br />
	char * (*func2)(const char *, int) = strchr;<br />
	printf(&#8220;%f %s&#8221;, func1(15.0), func2(&#8220;Wikipedia&#8221;, &#8216;p&#8217;));<br />
	/* prints &#8220;5.905512 pedia&#8221; */<br />
	return 0;<br />
}</p>
<p>The next program uses a function pointer to invoke one of two functions (sin or cos) indirectly from another function (compute_sum, computing an approximation of the function&#8217;s Riemann integration). The program operates by having function main call function compute_sum twice, passing it a pointer to the library function sin the first time, and a pointer to function cos the second time. Function compute_sum in turn invokes one of the two functions indirectly by dereferencing its function pointer argument funcp multiple times, adding together the values that the invoked function returns and returning the resulting sum. The two sums are written to the standard output by main.</p>
<p>#include<br />
#include </p>
<p>// Function taking a function pointer as an argument<br />
double compute_sum(double (*funcp)(double), double lo, double hi) {<br />
    double  sum = 0.0;</p>
<p>    // Add values returned by the pointed-to function &#8216;*funcp&#8217;<br />
    int i;<br />
    for(i = 0;  i &lt;= 100;  i++) {<br />
        double  x, y;</p>
<p>        // Use the function pointer &#039;funcp&#039; to invoke the function<br />
        x = i / 100.0 * (hi &#8211; lo) + lo;<br />
        y = (*funcp)(x);<br />
        sum += y;<br />
    }<br />
    return sum / 101.0;<br />
}</p>
<p>int main(void) {<br />
    double  (*fp)(double);      // Function pointer<br />
    double  sum;</p>
<p>    // Use &#039;sin()&#039; as the pointed-to function<br />
    fp = sin;<br />
    sum = compute_sum(fp, 0.0, 1.0);<br />
    printf(&quot;sum(sin): %f\n&quot;, sum);</p>
<p>    // Use &#039;cos()&#039; as the pointed-to function<br />
    fp = cos;<br />
    sum = compute_sum(fp, 0.0, 1.0);<br />
    printf(&quot;sum(cos): %f\n&quot;, sum);<br />
    return 0;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/what-is-function-pointer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Different methods of swapping 2 numbers</title>
		<link>https://www.emblogic.com/blog/09/different-methods-of-swapping-2-numbers/</link>
		<comments>https://www.emblogic.com/blog/09/different-methods-of-swapping-2-numbers/#comments</comments>
		<pubDate>Tue, 20 Sep 2016 15:10:38 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[arithmetic]]></category>
		<category><![CDATA[bitwise]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13684</guid>
		<description><![CDATA[#include&#60;stdio.h&#62; void swap(int *,int *); int main() { int temp; int *t; int a=100,b=200; //Using 3 variables //1.1 temp = a; a = b; b = temp; printf(&#8220;%d %d\n&#8221;,a,b); //1.2 swap(&#38;a,&#38;b); printf(&#8220;%d %d\n&#8221;,a,b); //Using 2 variables //2.1 a += b; &#8230; <a href="https://www.emblogic.com/blog/09/different-methods-of-swapping-2-numbers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;<br />
void swap(int *,int *);</p>
<p>int main()<br />
{<br />
int temp;<br />
int *t;<br />
int a=100,b=200;<br />
//Using 3 variables<br />
//1.1<br />
temp = a;<br />
a = b;<br />
b = temp;<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
//1.2<br />
swap(&amp;a,&amp;b);<br />
printf(&#8220;%d %d\n&#8221;,a,b);</p>
<p>//Using 2 variables<br />
//2.1<br />
a += b;<br />
b = a-b;<br />
a = a-b;<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
//2.2<br />
if(a!=0 &amp;&amp; b!=0)<br />
{<br />
a *= b;<br />
b = a/b;<br />
a = a/b;<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
}<br />
//2.3<br />
a = a^b;<br />
b = a^b;<br />
a = a^b;<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
//Using 2 variables in single step<br />
//3.1<br />
a = b+a-(b=a);<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
//3.2<br />
a = b*a/(b=a);<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
//3.3<br />
a ^=b^=a^=b;<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
return 0;<br />
}<br />
void swap(int *x,int *y)<br />
{<br />
int tmp;<br />
tmp = *x;<br />
*x = *y;<br />
*y = tmp;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/09/different-methods-of-swapping-2-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Errors in &#8220;Hello World&#8221; program</title>
		<link>https://www.emblogic.com/blog/09/errors-in-hello-world-program/</link>
		<comments>https://www.emblogic.com/blog/09/errors-in-hello-world-program/#comments</comments>
		<pubDate>Mon, 19 Sep 2016 17:31:16 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[#1st program in c]]></category>
		<category><![CDATA[#errors]]></category>
		<category><![CDATA[#Hello World]]></category>
		<category><![CDATA[#Warnings]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13682</guid>
		<description><![CDATA[#include&#60;stdio.h&#62; int main() { printf(&#8220;Hello World&#8221;); return 0; } /* Errors Line 1 :- *1. If u remove only preprocessor (#)-&#62;error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&#60;’ token *2.#nclude&#60;stdio.h&#62; -&#62;  error: invalid preprocessing directive #nclude *3. #include &#8230; <a href="https://www.emblogic.com/blog/09/errors-in-hello-world-program/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;<br />
int main()<br />
{<br />
printf(&#8220;Hello World&#8221;);<br />
return 0;<br />
}<br />
/* Errors<br />
Line 1 :-<br />
*1. If u remove only preprocessor (#)-&gt;error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&lt;’ token<br />
*2.#nclude&lt;stdio.h&gt; -&gt;  error: invalid preprocessing directive #nclude<br />
*3. #include -&gt; error: #include expects &#8220;FILENAME&#8221; or &lt;FILENAME&gt;<br />
*4,5 #include&lt;  -&gt; error: missing terminating &gt; character<br />
#include&lt;&gt;    error: empty filename in #include<br />
#include&lt;stdio.h  -&gt; 4th error<br />
*6. #include&lt;stdio&gt; -&gt; fatal error: stdio: No such file or directory</p>
<p>Line 2 :-<br />
*7. int main(  -&gt; error: expected declaration specifiers or ‘&#8230;’ before ‘{’ token<br />
*8. int main   -&gt; error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token<br />
*9. in main()  -&gt; error: unknown type name ‘in’<br />
*10. int main(*) -&gt; error: expected declaration specifiers or ‘&#8230;’ before ‘*’ token<br />
*11. int main(&#8216;) -&gt;  error: missing terminating &#8216; character<br />
*12. If no main() -&gt; error: expected identifier or ‘(’ before ‘{’ token</p>
<p>Line 3 :-<br />
*13. if no {  -&gt; error: expected declaration specifiers before ‘printf’<br />
error: expected declaration specifiers before ‘return’<br />
error: expected declaration specifiers before ‘}’ token<br />
*14. ..{  -&gt; error: expected ‘{’ at end of input<br />
*15. {..  -&gt; error: expected expression before ‘.’ token</p>
<p>Line 4 :-<br />
*16. printf(&#8220;Hello World&#8221;). -&gt; error: expected identifier before ‘return’<br />
*17. printf(&#8220;Hello World&#8221;) -&gt; error: expected ; before ‘return’<br />
*18. printf(&#8220;Hello World&#8221;) -&gt; error: expected ‘)’ before ‘;’ token<br />
error: expected ‘;’ before ‘}’ token<br />
*19. print(&#8220;Hello World&#8221;)  -&gt; undefined reference to `print&#8217;<br />
*20. print(Hello World)  -&gt; error: ‘Hello’ undeclared (first use in this function)<br />
*21. print(&#8220;Hello World)  -&gt; warning: missing terminating &#8221; character [enabled by default]<br />
error: missing terminating &#8221; character<br />
error: expected expression before ‘return’<br />
error: expected ‘;’ before ‘}’ token<br />
Line 5 :-<br />
*22. return c; -&gt; error: ‘c’ undeclared (first use in this function)<br />
Line 6 :-<br />
*23. missing } -&gt; error: expected declaration or statement at end of inpu</p>
<p>*/</p>
<p>/* Warnings</p>
<p>w1. If u remove header -&gt; warning: incompatible implicit declaration of built-in function ‘printf’<br />
*w2. #include&lt;stdio.h&gt; -&gt; warning: extra tokens at end of #include directive [enabled by default]<br />
*w3. return NULL       -&gt; warning: return makes integer from pointer without a cast</p>
<p>*/ Special Case :-<br />
/* ; -&gt; You can freely put ; or ;; anywhere in main (before fn., after fn., blank line etc.)<br />
*      Except you can&#8217;t put ; after main();<br />
*      ;int main() -&gt; Valid<br />
*      {; -&gt;         Valid<br />
*      }; -&gt;         Valid<br />
*      printf(&#8220;Hello World&#8221;);; -&gt; Valid<br />
*    Shows warning if used after #include&lt;stdio.h&gt;;<br />
*/</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/09/errors-in-hello-world-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is bss (Block Storage Start) ?</title>
		<link>https://www.emblogic.com/blog/08/what-is-bss-block-storage-start/</link>
		<comments>https://www.emblogic.com/blog/08/what-is-bss-block-storage-start/#comments</comments>
		<pubDate>Tue, 16 Aug 2016 19:14:21 +0000</pubDate>
		<dc:creator><![CDATA[Pankaj Suryawanshi]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13664</guid>
		<description><![CDATA[The .bss segment stores all uninitialized global, static, and external variables (declared with extern keyword). Global, external, and static variable are by default initialized to zero. This section occupies no actual space in the object file. it is merely a &#8230; <a href="https://www.emblogic.com/blog/08/what-is-bss-block-storage-start/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify">The .bss segment stores all uninitialized global, static, and external variables (declared with extern keyword). Global, external, and static variable are by default initialized to zero. This section occupies no actual space in the object file. it is merely a place holder. uninitialized variables do not have to occupy any actual disk space in the object file.<br />
The use of the term .bss to denote uninitialized data is universal. It Stands &#8220;Block Storage Start&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/08/what-is-bss-block-storage-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Matrix Addition using 2D Array with Pointers</title>
		<link>https://www.emblogic.com/blog/08/matrix-addition-using-2d-array-with-pointers/</link>
		<comments>https://www.emblogic.com/blog/08/matrix-addition-using-2d-array-with-pointers/#comments</comments>
		<pubDate>Sun, 14 Aug 2016 19:39:04 +0000</pubDate>
		<dc:creator><![CDATA[Pankaj Suryawanshi]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13659</guid>
		<description><![CDATA[#include #include int main() { int r,c,k; printf(&#8220;enter the size of rows\n&#8221;); scanf(&#8220;%d&#8221;,&#38;r); printf(&#8220;enter the size of columns\n&#8221;); scanf(&#8220;%d&#8221;,&#38;c); int **a,**b,**d,i,j; a=(int **)malloc(sizeof(int*)*3); if(!a) { perror(&#8220;malloc&#8221;); goto x; } for(i=0;i&#60;3;i++) *(a+i)=(int *)malloc(sizeof(int)*3); if(!(*(a+i))) { perror(&#34;malloc&#34;); goto x; } b=(int **)malloc(sizeof(int*)*3); &#8230; <a href="https://www.emblogic.com/blog/08/matrix-addition-using-2d-array-with-pointers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include<br />
#include</p>
<p>int main()<br />
{<br />
	int r,c,k;<br />
	printf(&#8220;enter the size of rows\n&#8221;);<br />
	scanf(&#8220;%d&#8221;,&amp;r);<br />
	printf(&#8220;enter the size of columns\n&#8221;);<br />
	scanf(&#8220;%d&#8221;,&amp;c);<br />
	int **a,**b,**d,i,j;<br />
	a=(int **)malloc(sizeof(int*)*3);<br />
	if(!a)<br />
	{<br />
		perror(&#8220;malloc&#8221;);<br />
		goto x;<br />
	}<br />
	for(i=0;i&lt;3;i++)<br />
	*(a+i)=(int *)malloc(sizeof(int)*3);<br />
	if(!(*(a+i)))<br />
	{<br />
		perror(&quot;malloc&quot;);<br />
		goto x;<br />
	}<br />
	b=(int **)malloc(sizeof(int*)*3);<br />
	if(!b)<br />
	{<br />
		perror(&quot;malloc&quot;);<br />
		goto x;<br />
	}<br />
	for(i=0;i&lt;3;i++)<br />
	*(b+i)=(int *)malloc(sizeof(int)*3);<br />
	if(!(*(b+i)))<br />
	{<br />
		perror(&quot;malloc&quot;);<br />
		goto x;<br />
	}<br />
	d=(int **)malloc(sizeof(int*)*3);<br />
	if(!d)<br />
	{<br />
		perror(&quot;malloc&quot;);<br />
		goto x;<br />
	}<br />
	for(i=0;i&lt;3;i++)<br />
	*(d+i)=(int *)malloc(sizeof(int)*3);<br />
	if(!(*(d+i)))<br />
	{<br />
		perror(&quot;malloc&quot;);<br />
		goto x;<br />
	}</p>
<p>	printf(&quot;enter the element of 1st matrix\n&quot;);<br />
	for(i=0;i&lt;r;i++)<br />
		{<br />
			for(j=0;j&lt;c;j++)<br />
				{<br />
					scanf(&quot;%d&quot;,*(a+i)+j);<br />
				}<br />
		}</p>
<p>	printf(&quot;enter the element of 2nd matrix\n&quot;);<br />
	for(i=0;i&lt;r;i++)<br />
		{<br />
			for(j=0;j&lt;c;j++)<br />
				{<br />
					scanf(&quot;%d&quot;,*(b+i)+j);<br />
				}<br />
		}</p>
<p>	printf(&quot;the element of 1st matrix\n&quot;);<br />
	for(i=0;i&lt;r;i++)<br />
		{<br />
			for(j=0;j&lt;c;j++)<br />
				{<br />
					printf(&quot;%d\t&quot;,*(*(a+i)+j));<br />
				}<br />
			printf(&quot;\n&quot;);<br />
		}</p>
<p>	printf(&quot;\nthe element of 2nd matrix\n&quot;);<br />
	for(i=0;i&lt;r;i++)<br />
		{<br />
			for(j=0;j&lt;c;j++)<br />
				{<br />
					printf(&quot;%d\t&quot;,*(*(b+i)+j));<br />
				}<br />
			printf(&quot;\n&quot;);<br />
		}</p>
<p>			for(i=0;i&lt;r;i++)<br />
			{</p>
<p>				for(j=0;j&lt;c;j++)</p>
<p>				{<br />
					*((*(d+i)+j)) = *((*(a+i))+j) + *((*(b+i))+j);</p>
<p>				}<br />
			}</p>
<p>	printf(&quot;\naddition is\n&quot;);</p>
<p>			for(i=0;i&lt;r;i++)<br />
			{<br />
			for(j=0;j&lt;c;j++)</p>
<p>				{<br />
					printf(&quot;%d\t&quot;,*((*(d+i))+j));<br />
				}<br />
			printf(&quot;\n&quot;);<br />
			}<br />
return 0;<br />
x:<br />
	return -1;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/08/matrix-addition-using-2d-array-with-pointers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dangling and wild pointer</title>
		<link>https://www.emblogic.com/blog/07/dangling-and-wild-pointer/</link>
		<comments>https://www.emblogic.com/blog/07/dangling-and-wild-pointer/#comments</comments>
		<pubDate>Sun, 31 Jul 2016 08:25:41 +0000</pubDate>
		<dc:creator><![CDATA[Manoj Raghav]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13630</guid>
		<description><![CDATA[dandling pointer is a pointer which pointing to non existing memory location. when a object is deleted or de allocated without modifying the value of the pointer that time dangling pointer arise. uninitialized pointer are known as wild pointer beacause &#8230; <a href="https://www.emblogic.com/blog/07/dangling-and-wild-pointer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>dandling pointer is a pointer which pointing to non existing memory location.</p>
<p>when a object is deleted or de allocated without modifying the value of the pointer that time dangling pointer arise.</p>
<p>uninitialized pointer are known as wild pointer beacause they point to some other memory location .</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/07/dangling-and-wild-pointer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write a Program to Subtract two matrix?</title>
		<link>https://www.emblogic.com/blog/03/write-a-program-to-subtract-two-matrix/</link>
		<comments>https://www.emblogic.com/blog/03/write-a-program-to-subtract-two-matrix/#comments</comments>
		<pubDate>Wed, 30 Mar 2016 05:51:42 +0000</pubDate>
		<dc:creator><![CDATA[Jyoti Singh]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13449</guid>
		<description><![CDATA[code : #include&#60;stdio.h&#62; #include&#60;stdlib.h&#62; int main() { system(&#8220;clear&#8221;); int r,c,i,j,a[10][10],b[10][10],d[10][10]; printf(&#8220;Enter Row\n&#8221;); scanf(&#8220;%d&#8221;,&#38;r); printf(&#8220;Enter Column\n&#8221;); scanf(&#8220;%d&#8221;,&#38;c); printf(&#8220;Enter Element of Matrix1\n&#8221;); for(i=0;i&#60;r;i++) { for(j=0;j&#60;c;j++) { scanf(&#8220;%d&#8221;,&#38;a[i][j]); } } printf(&#8220;Enter Element of Matrix2\n&#8221;); for(i=0;i&#60;r;i++) { for(j=0;j&#60;c;j++) { scanf(&#8220;%d&#8221;,&#38;b[i][j]); } } for(i=0;i&#60;r;i++) { &#8230; <a href="https://www.emblogic.com/blog/03/write-a-program-to-subtract-two-matrix/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>code :</p>
<p>#include&lt;stdio.h&gt;<br />
#include&lt;stdlib.h&gt;<br />
int main()<br />
{<br />
system(&#8220;clear&#8221;);<br />
int r,c,i,j,a[10][10],b[10][10],d[10][10];<br />
printf(&#8220;Enter Row\n&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;r);<br />
printf(&#8220;Enter Column\n&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;c);<br />
printf(&#8220;Enter Element of Matrix1\n&#8221;);<br />
for(i=0;i&lt;r;i++)<br />
{<br />
for(j=0;j&lt;c;j++)<br />
{<br />
scanf(&#8220;%d&#8221;,&amp;a[i][j]);<br />
}<br />
}<br />
printf(&#8220;Enter Element of Matrix2\n&#8221;);<br />
for(i=0;i&lt;r;i++)<br />
{<br />
for(j=0;j&lt;c;j++)<br />
{<br />
scanf(&#8220;%d&#8221;,&amp;b[i][j]);<br />
}<br />
}<br />
for(i=0;i&lt;r;i++)<br />
{<br />
for(j=0;j&lt;c;j++)<br />
{<br />
d[i][j]=a[i][j]-b[i][j];<br />
}<br />
}<br />
printf(&#8220;Subtraction of two Matrixs\n&#8221;);<br />
for(i=0;i&lt;r;i++)<br />
{<br />
for(j=0;j&lt;c;j++)<br />
{<br />
printf(&#8220;%d-%d=%d\n&#8221;,a[i][j],b[i][j],d[i][j]);<br />
}<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/write-a-program-to-subtract-two-matrix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple Data Compression Technique</title>
		<link>https://www.emblogic.com/blog/03/multiple-data-compression-technique/</link>
		<comments>https://www.emblogic.com/blog/03/multiple-data-compression-technique/#comments</comments>
		<pubDate>Fri, 25 Mar 2016 14:52:33 +0000</pubDate>
		<dc:creator><![CDATA[Jyoti Singh]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[Project 2: Multiple Data Compression and Encryption]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13428</guid>
		<description><![CDATA[Multiple Data Compression is an iterative technique to compress the text data. RCS file: ./header.h,v Working file: ./header.h head: 1.4 branch: locks: strict root: 1.4 access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: This &#8230; <a href="https://www.emblogic.com/blog/03/multiple-data-compression-technique/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Multiple Data Compression is an iterative technique to compress the text data.</p>
<p>RCS file: ./header.h,v<br />
Working file: ./header.h<br />
head: 1.4<br />
branch:<br />
locks: strict<br />
root: 1.4<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 4; selected revisions: 4<br />
description:<br />
This is the header file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4 locked by: root;<br />
date: 2015/10/29 15:19:42; author: root; state: Exp; lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/10/29 14:38:28; author: root; state: Exp; lines: +8 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/10/29 14:29:02; author: root; state: Exp; lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/10/29 14:00:38; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: ./main.c,v<br />
Working file: ./main.c<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
root: 1.3<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3; selected revisions: 3<br />
description:<br />
This is the main file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3 locked by: root;<br />
date: 2015/10/31 16:15:42; author: root; state: Exp; lines: +4 -4<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/10/29 14:29:04; author: root; state: Exp; lines: +11 -8<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/10/29 14:23:27; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: ./ma.c,v<br />
Working file: ./ma.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2; selected revisions: 2<br />
description:<br />
This file is to find the master array<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2 locked by: root;<br />
date: 2015/10/31 17:37:53; author: root; state: Exp; lines: +4 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/10/29 14:00:38; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: ./mdc.c,v<br />
Working file: ./mdc.c<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
root: 1.3<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3; selected revisions: 3<br />
description:<br />
This is the main file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3 locked by: root;<br />
date: 2015/10/31 17:37:51; author: root; state: Exp; lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/10/29 14:23:35; author: root; state: Exp; lines: +2 -25<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/10/29 14:00:38; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: ./cl.c,v<br />
Working file: ./cl.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
This file is to find the codelength<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1 locked by: root;<br />
date: 2015/10/29 14:00:38; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: ./compress.c,v<br />
Working file: ./compress.c<br />
head: 1.16<br />
branch:<br />
locks: strict<br />
root: 1.16<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 16; selected revisions: 16<br />
description:<br />
This file is compress the file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16 locked by: root;<br />
date: 2015/11/05 07:36:34; author: root; state: Exp; lines: +4 -4<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2015/11/05 07:30:51; author: root; state: Exp; lines: +10 -10<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/10/31 17:37:54; author: root; state: Exp; lines: +13 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/10/30 10:53:09; author: root; state: Exp; lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/10/30 10:45:30; author: root; state: Exp; lines: +71 -11<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/10/30 07:05:04; author: root; state: Exp; lines: +3 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/10/30 07:01:47; author: root; state: Exp; lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/10/30 06:47:32; author: root; state: Exp; lines: +3 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/10/29 17:12:00; author: root; state: Exp; lines: +3 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/10/29 17:04:29; author: root; state: Exp; lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/10/29 16:55:22; author: root; state: Exp; lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/10/29 16:18:57; author: root; state: Exp; lines: +46 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/10/29 15:19:44; author: root; state: Exp; lines: +75 -21<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/10/29 14:50:01; author: root; state: Exp; lines: +13 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/10/29 14:38:30; author: root; state: Exp; lines: +15 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/10/29 14:00:38; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: ./decompress.c,v<br />
Working file: ./decompress.c<br />
head: 1.27<br />
branch:<br />
locks: strict<br />
root: 1.27<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 27; selected revisions: 27<br />
description:<br />
This file is to decompress<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.27 locked by: root;<br />
date: 2015/11/05 07:45:47; author: root; state: Exp; lines: +8 -8<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.26<br />
date: 2015/11/05 07:36:35; author: root; state: Exp; lines: +10 -10<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.25<br />
date: 2015/11/05 07:33:46; author: root; state: Exp; lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.24<br />
date: 2015/11/05 07:30:53; author: root; state: Exp; lines: +14 -14<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.23<br />
date: 2015/10/31 17:37:54; author: root; state: Exp; lines: +5 -9<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22<br />
date: 2015/10/30 14:53:55; author: root; state: Exp; lines: +5 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2015/10/30 14:52:43; author: root; state: Exp; lines: +4 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2015/10/30 14:51:23; author: root; state: Exp; lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2015/10/30 14:49:39; author: root; state: Exp; lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2015/10/30 14:48:48; author: root; state: Exp; lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2015/10/30 14:46:45; author: root; state: Exp; lines: +2 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2015/10/30 10:45:31; author: root; state: Exp; lines: +47 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2015/10/29 17:18:49; author: root; state: Exp; lines: +8 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/10/29 17:14:50; author: root; state: Exp; lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/10/29 17:14:30; author: root; state: Exp; lines: +0 -8<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/10/29 17:13:12; author: root; state: Exp; lines: +9 -8<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/10/29 17:12:01; author: root; state: Exp; lines: +8 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/10/29 16:59:58; author: root; state: Exp; lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/10/29 16:55:23; author: root; state: Exp; lines: +38 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/10/29 15:35:17; author: root; state: Exp; lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/10/29 15:34:15; author: root; state: Exp; lines: +0 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/10/29 15:33:58; author: root; state: Exp; lines: +0 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/10/29 15:32:47; author: root; state: Exp; lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/10/29 15:32:19; author: root; state: Exp; lines: +61 -18<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/10/29 14:50:02; author: root; state: Exp; lines: +19 -7<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/10/29 14:38:31; author: root; state: Exp; lines: +25 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/10/29 14:00:38; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/multiple-data-compression-technique/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write a program to find particular no. is power of two or not?</title>
		<link>https://www.emblogic.com/blog/03/write-a-program-to-find-particular-no-is-power-of-two-or-not/</link>
		<comments>https://www.emblogic.com/blog/03/write-a-program-to-find-particular-no-is-power-of-two-or-not/#comments</comments>
		<pubDate>Wed, 23 Mar 2016 05:18:21 +0000</pubDate>
		<dc:creator><![CDATA[Jyoti Singh]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13422</guid>
		<description><![CDATA[CODE: #include&#60;stdio.h&#62; int main() { int n; printf(&#8220;Enter a value\n&#8221;); scanf(&#8220;%d&#8221;,&#38;n); if((n &#38;(n-1))==0) printf(&#8220;no. is power of 2\n&#8221;); else printf(&#8220;no. is not power of 2\n&#8221;); return 0; }]]></description>
				<content:encoded><![CDATA[<p>CODE:</p>
<p>#include&lt;stdio.h&gt;<br />
int main()<br />
{<br />
int n;<br />
printf(&#8220;Enter a value\n&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;n);<br />
if((n &amp;(n-1))==0)<br />
printf(&#8220;no. is power of 2\n&#8221;);<br />
else<br />
printf(&#8220;no. is not power of 2\n&#8221;);<br />
return 0;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/write-a-program-to-find-particular-no-is-power-of-two-or-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write a program to reverse a number?</title>
		<link>https://www.emblogic.com/blog/03/write-a-program-to-reverse-a-number/</link>
		<comments>https://www.emblogic.com/blog/03/write-a-program-to-reverse-a-number/#comments</comments>
		<pubDate>Wed, 23 Mar 2016 05:11:47 +0000</pubDate>
		<dc:creator><![CDATA[Jyoti Singh]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13420</guid>
		<description><![CDATA[CODE: #include&#60;stdio.h&#62; int main() { int n,r=0,num; printf(&#8220;Enter a number:\n&#8221;); scanf(&#8220;%d&#8221;,&#38;n); num=n; while(n!=0) { r=r*10; r=r+n%10; n=n/10; } printf(&#8220;Reverse number is %d\n&#8221;,r); if(num==r) printf(&#8220;Palindrome number\n&#8221;); else printf(&#8220;Not a Palindrome\n&#8221;); return 0; }]]></description>
				<content:encoded><![CDATA[<p>CODE:</p>
<p>#include&lt;stdio.h&gt;<br />
int main()<br />
{<br />
int n,r=0,num;<br />
printf(&#8220;Enter a number:\n&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;n);<br />
num=n;<br />
while(n!=0)<br />
{<br />
r=r*10;<br />
r=r+n%10;<br />
n=n/10;<br />
}<br />
printf(&#8220;Reverse number is %d\n&#8221;,r);<br />
if(num==r)<br />
printf(&#8220;Palindrome number\n&#8221;);<br />
else<br />
printf(&#8220;Not a Palindrome\n&#8221;);<br />
return 0;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/write-a-program-to-reverse-a-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write a program to print Diamond Pattern?</title>
		<link>https://www.emblogic.com/blog/03/write-a-program-to-print-diamond-pattern/</link>
		<comments>https://www.emblogic.com/blog/03/write-a-program-to-print-diamond-pattern/#comments</comments>
		<pubDate>Tue, 22 Mar 2016 09:24:31 +0000</pubDate>
		<dc:creator><![CDATA[Jyoti Singh]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13416</guid>
		<description><![CDATA[CODE: #include&#60;stdio.h&#62; int main() { int i,j,k,n,space,temp; printf(&#8220;enter value of n\n&#8221;); scanf(&#8220;%d&#8221;,&#38;n); temp=n; for(i=1;i&#60;=n;i++) { for(j=i;j&#60;n;j++) { printf(&#8221; &#8220;); } for(k=1;k&#60;(2*i);k++) { printf(&#8220;*&#8221;); } printf(&#8220;\n&#8221;); } temp=1; for(i=n-1;i&#62;=1;i&#8211;) { for(j=1;j&#60;=temp;j++) { printf(&#8221; &#8220;); } temp++; for(k=1;k&#60;(i*2);k++) { printf(&#8220;*&#8221;); } printf(&#8220;\n&#8221;); &#8230; <a href="https://www.emblogic.com/blog/03/write-a-program-to-print-diamond-pattern/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>CODE:</p>
<p>#include&lt;stdio.h&gt;<br />
int main()<br />
{<br />
int i,j,k,n,space,temp;<br />
printf(&#8220;enter value of n\n&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;n);<br />
temp=n;<br />
for(i=1;i&lt;=n;i++)<br />
{<br />
for(j=i;j&lt;n;j++)<br />
{<br />
printf(&#8221; &#8220;);<br />
}<br />
for(k=1;k&lt;(2*i);k++)<br />
{<br />
printf(&#8220;*&#8221;);<br />
}<br />
printf(&#8220;\n&#8221;);<br />
}<br />
temp=1;<br />
for(i=n-1;i&gt;=1;i&#8211;)<br />
{<br />
for(j=1;j&lt;=temp;j++)<br />
{<br />
printf(&#8221; &#8220;);<br />
}<br />
temp++;<br />
for(k=1;k&lt;(i*2);k++)<br />
{<br />
printf(&#8220;*&#8221;);<br />
}<br />
printf(&#8220;\n&#8221;);<br />
}<br />
}</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/write-a-program-to-print-diamond-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
