<?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-2150319923058444181</id><updated>2024-12-18T19:18:50.283-08:00</updated><category term="C language"/><category term="C Interview Question"/><category term="Technical"/><title type='text'>Preparing For Software Interviews</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://preparingforinterviews.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2150319923058444181/posts/default'/><link rel='alternate' type='text/html' href='http://preparingforinterviews.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04509760233422384097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2150319923058444181.post-1150748416554897933</id><published>2011-09-25T09:53:00.000-07:00</published><updated>2011-09-25T10:01:18.622-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C language"/><title type='text'>C Programming Data Types : Part 1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
C has concept of data type which are used to define type of variable means a variable hold which type of data (i.e char,interger,float e.t.c).

&lt;br /&gt;
so there are 6 data types available in the C are.
&lt;br /&gt;
1.) Integer.
&lt;br /&gt;
2.) Char .
&lt;br /&gt;
3.) Float.
&lt;br /&gt;
4.) Double.
&lt;br /&gt;
5.) void .
&lt;br /&gt;
6.) Enum.

&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;





Integer&lt;/h3&gt;
Integer datat ype are used to define integer type.
&lt;br /&gt;
&lt;br /&gt;
Int &lt;i&gt;Variable name&lt;/i&gt;
&lt;br /&gt;
&lt;br /&gt;
Example.
&lt;br /&gt;
&lt;br /&gt;
int val;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;




Char&lt;/h3&gt;
char defines characters. 

&lt;br /&gt;
&lt;br /&gt;
Example.

Char val;
&lt;br /&gt;
val=INDIA;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;




Double&lt;/h3&gt;
Double use  for large floating point variables.

&lt;br /&gt;
&lt;br /&gt;
Example.

&lt;br /&gt;
&lt;br /&gt;
Double val;
&lt;br /&gt;
&lt;br /&gt;
val=250000;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;




Enumerated&lt;/h3&gt;
A enum type is integer type that allows to give the name to certain values.

&lt;br /&gt;
&lt;br /&gt;
Example.

&lt;br /&gt;
&lt;br /&gt;
enum language { english, french, spanish = 4, german, chinese };

&lt;br /&gt;
&lt;br /&gt;
If value assigned to the variable then that value for that variable is used .if not then the value of last variable + 1 is the value of that variable.
&lt;br /&gt;
&lt;br /&gt;
If no value is assigned to the variable then default value is used from 0.
&lt;br /&gt;
&lt;br /&gt;
english-0
&lt;br /&gt;
&lt;br /&gt;
french-1
&lt;br /&gt;
&lt;br /&gt;
spanish=4
&lt;br /&gt;
&lt;br /&gt;
german=5
&lt;br /&gt;
&lt;br /&gt;
chinese=6
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;



Void&lt;/h3&gt;
Void means &quot;containing nothing&quot;

&lt;br /&gt;
&lt;br /&gt;
void has no values therefore we can&#39;t use it to declare variable type.It is basically use to define the type of function like.
&lt;br /&gt;
&lt;br /&gt;
void main()
&lt;br /&gt;
&lt;br /&gt;
That&#39;s means the function main returning nothing.

&lt;br /&gt;
&lt;h3&gt;



Modifiers&lt;/h3&gt;
Modifiers define the amount of memory allocated to the variable.
&lt;br /&gt;
&lt;br /&gt;
The type of modifiers are .

&lt;br /&gt;
short
&lt;br /&gt;
long
&lt;br /&gt;
signed 
&lt;br /&gt;
Unsigned
&lt;br /&gt;
short int &amp;gt;=   int         &amp;gt;= long int
&lt;br /&gt;
float       &amp;gt;=   double   &amp;gt;= long double
&lt;br /&gt;
That means the value assigned by the short int is less than or equal to int .Similar the value assigned by the int is equal or less than value assigned by the long int.
&lt;br /&gt;
If you want to check manually the ranges of integer and float then try the below code .

&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;limits.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
printf(&quot;Signed char minimum value: %d \n&quot;, SCHAR_MIN );&lt;br /&gt;
printf(&quot;Signed char maximum value: %d \n&quot;, SCHAR_MAX );&lt;br /&gt;
printf(&quot;Unsigned char minimum value: %d \n&quot;, 0 );&lt;br /&gt;
printf(&quot;Unsigned char maximum value: %d \n&quot;, UCHAR_MAX );&lt;br /&gt;
printf(&quot;Char minimum value: %d \n&quot;, CHAR_MIN );&lt;br /&gt;
printf(&quot;Char maximum value: %d \n&quot;, CHAR_MAX );&lt;br /&gt;
printf(&quot;Signed short minimum value: %d \n&quot;, SHRT_MIN );&lt;br /&gt;
printf(&quot;Signed short maximum value: %d \n&quot;, SHRT_MAX );&lt;br /&gt;
printf(&quot;Unsigned short minimum value: %d \n&quot;, 0 );&lt;br /&gt;
printf(&quot;Unsigned short maximum value: %d \n&quot;, USHRT_MAX );&lt;br /&gt;
printf(&quot;Signed int minimum value: %d \n&quot;, INT_MIN );&lt;br /&gt;
printf(&quot;Signed int maximum value: %d \n&quot;, INT_MAX );&lt;br /&gt;
printf(&quot;Unsigned int minimum value: %u \n&quot;, 0 );&lt;br /&gt;
printf(&quot;Unsigned int maximum value: %u \n&quot;, UINT_MAX );&lt;br /&gt;
printf(&quot;Signed long minimum value: %ld \n&quot;, LONG_MIN );&lt;br /&gt;
printf(&quot;Signed long maximum value: %ld \n&quot;, LONG_MAX );&lt;br /&gt;
printf(&quot;Unsigned long minimum value: %lu \n&quot;, 0 );&lt;br /&gt;
printf(&quot;Unsigned long maximum value: %lu \n&quot;, ULONG_MAX );&lt;br /&gt;
printf(&quot;Signed long long minimum value: %lld \n&quot;, LLONG_MIN );&lt;br /&gt;
printf(&quot;Signed long long maximum value: %lld \n&quot;, LLONG_MAX );&lt;br /&gt;
printf(&quot;Unsigned long long minimum value: %lu \n&quot;, 0 );&lt;br /&gt;
printf(&quot;Unsigned long long maximum value: %llu \n&quot;, ULLONG_MAX );&lt;br /&gt;
&lt;br /&gt;
getch();&lt;br /&gt;
&lt;br /&gt;
}
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Output
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFeewDK2QJ-lqJ5tR3-xBIAg3QojjHudm-oXWbSxhDPXB0yXjaGwZfteqQ4z7WsSeDB-QTv0H7NIg3XTAWRngam8StFVcnhSwVruWgYvo2KrAyyEDTvraWDRV6g6F5mWnCsHA4H3QB7RQj/s1600/rangeofdatatype.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;321&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFeewDK2QJ-lqJ5tR3-xBIAg3QojjHudm-oXWbSxhDPXB0yXjaGwZfteqQ4z7WsSeDB-QTv0H7NIg3XTAWRngam8StFVcnhSwVruWgYvo2KrAyyEDTvraWDRV6g6F5mWnCsHA4H3QB7RQj/s640/rangeofdatatype.png&quot; width=&quot;560&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#39;s it i will  continue this tutorial in next section too.
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://preparingforinterviews.blogspot.com/feeds/1150748416554897933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://preparingforinterviews.blogspot.com/2011/09/c-programming-data-types-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2150319923058444181/posts/default/1150748416554897933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2150319923058444181/posts/default/1150748416554897933'/><link rel='alternate' type='text/html' href='http://preparingforinterviews.blogspot.com/2011/09/c-programming-data-types-part-1.html' title='C Programming Data Types : Part 1'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04509760233422384097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFeewDK2QJ-lqJ5tR3-xBIAg3QojjHudm-oXWbSxhDPXB0yXjaGwZfteqQ4z7WsSeDB-QTv0H7NIg3XTAWRngam8StFVcnhSwVruWgYvo2KrAyyEDTvraWDRV6g6F5mWnCsHA4H3QB7RQj/s72-c/rangeofdatatype.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2150319923058444181.post-6344998787814304607</id><published>2011-09-24T10:32:00.000-07:00</published><updated>2011-09-24T10:32:35.071-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C Interview Question"/><title type='text'>What is the output of printf(&quot;%d&quot;)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
Ans: 
&lt;br /&gt;
printf ( &quot;format string=&quot;&quot;&quot;, list of=&quot;&quot; variables=&quot;&quot; ) ; &lt;br /&gt;
format string=&quot;&quot; can contain, &lt;br /&gt;
%f for printing real values &lt;br /&gt;
%d for printing integer values  &lt;br /&gt;
%c for printing character values  &lt;br /&gt;
&lt;br /&gt;
When i execute this instruction  on dev c++ i got a garbage value .If you want to try this try the below code .

&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;br /&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt; &lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
printf(&quot;%d&quot;);&lt;br /&gt;
getch();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://preparingforinterviews.blogspot.com/feeds/6344998787814304607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://preparingforinterviews.blogspot.com/2011/09/what-is-output-of-printfd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2150319923058444181/posts/default/6344998787814304607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2150319923058444181/posts/default/6344998787814304607'/><link rel='alternate' type='text/html' href='http://preparingforinterviews.blogspot.com/2011/09/what-is-output-of-printfd.html' title='What is the output of printf(&quot;%d&quot;)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04509760233422384097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2150319923058444181.post-1821203981193617285</id><published>2011-09-24T01:49:00.000-07:00</published><updated>2011-09-24T05:23:35.463-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C language"/><category scheme="http://www.blogger.com/atom/ns#" term="Technical"/><title type='text'>Introduction To C Language</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

&lt;h3&gt;
History&lt;/h3&gt;
&lt;br /&gt;
1.) The C language was developed by AT&amp;amp;T bell lab in early 1970s by Dennis Ritchie.&lt;br /&gt;
2.) It was based on early language of AT&amp;amp;T bell  lab language called &#39;B&#39; which is also based on BPCL. 

&lt;br /&gt;

&lt;h3&gt;
Advantages&lt;/h3&gt;
&lt;br /&gt;
1.) C is general purpose language for an example 
&lt;br /&gt;
(COBOL is used for making business application and FORTRAN is used for scientific applications but we can use C Language for both).

&lt;br /&gt;
2.) C  is not very high level languages.You can use C to direct memory access,create bitwise operation and so on.

&lt;br /&gt;
3.) C is not so high level language so the execution speed of C language is fast.

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiioGWPaVdk67yw20t_9TbE9B5DI_U4ewf95-__jBdjGmwti680jr8D1VhcQtr-9yKIOAMIV8BsXdo0D4VAr-l4PuCevAMsgITv0QnOt1eud9UntGq42cWLcv-pDOmvsfwocB3WHelMPYP3/s1600/Advancec.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;187&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiioGWPaVdk67yw20t_9TbE9B5DI_U4ewf95-__jBdjGmwti680jr8D1VhcQtr-9yKIOAMIV8BsXdo0D4VAr-l4PuCevAMsgITv0QnOt1eud9UntGq42cWLcv-pDOmvsfwocB3WHelMPYP3/s320/Advancec.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br/&gt;
&lt;h3&gt;








Use Of C&lt;/h3&gt;
&lt;br /&gt;
1.) C is use for wriiting software to control hardware.
&lt;br /&gt;
2.)Unix and its derivatives are written in C language.

&lt;br /&gt;
3.) Languages like perl and php are written in C languages.



&lt;br /&gt;
&lt;h3&gt;








Structure Of C&lt;/h3&gt;
&lt;br /&gt;
C mainly included two type of files 

&lt;br /&gt;
1.)Header File : This file have extension &quot; .h &quot; it includes methods,constants,macros e.t.c/

&lt;br /&gt;
2.) Source file: This file have extension &quot; .c &quot; it includes your source code .






&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://preparingforinterviews.blogspot.com/feeds/1821203981193617285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://preparingforinterviews.blogspot.com/2011/09/introduction-to-c-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2150319923058444181/posts/default/1821203981193617285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2150319923058444181/posts/default/1821203981193617285'/><link rel='alternate' type='text/html' href='http://preparingforinterviews.blogspot.com/2011/09/introduction-to-c-language.html' title='Introduction To C Language'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04509760233422384097</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiioGWPaVdk67yw20t_9TbE9B5DI_U4ewf95-__jBdjGmwti680jr8D1VhcQtr-9yKIOAMIV8BsXdo0D4VAr-l4PuCevAMsgITv0QnOt1eud9UntGq42cWLcv-pDOmvsfwocB3WHelMPYP3/s72-c/Advancec.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>