10/10/12
Share 0
C Linux interview questions and answers
More Next Blog
C programming questions and answers
C language tricky good pointers questions answers and explanation operators data types arrays structures questions fun recursion preprocessors, looping, file handling, strings questions switch case if else printf advance c linux objective types faq interview questions and answers with explanation and solution for freshers or beginners. Placement online written tes numbers Armstrong Fibonacci series factorial palindrome code programs examples on c c++ tutorials and pdf
C tutorial C Programming Questions C Interview Questions C Programs C Test C programming pdf Program of c++ Create projects
SHARE POSTS
Sr. Java Developers
Exp: 5-10 Years. Sal: 15-25 Lacs. Loc: Pune. Apply Now!
Like 0
Tw eet
www.Naukri.com/C++_Jobs
Search
Ads by Google
C++ Tutorials in PDF Linux Tutorial Java Compiler
C QUESTIONS AND ANSWERS
C program examples C interview questions and answers Data type questions Variable naming rule questions Operators questions Control flow questions Switch case questions Looping questions Pointer questions String questions Printf,Scanf questions Preprocessor questions Structure questions Commad line argument C questions in Linux C online test C mixed practice sets C tricky questions Example of recursion in c C programming forums
After Effects Tutorial
Laser-etched metal pt2 The finishing touches include by shortformvideos on YouTube
C Linux interview questions and answers
CL i n u xi n t e r v i e wq u e s t i o n sa n da n s w e r s
( 1 ) W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c c o m p i l e ri nL i n u x ? # i n c l u d e < s t d i o . h > i n tm a i n ( ) { i n ta = 5 ; p r i n t f ( " % d% d% d " , a + + , a + + , + + a ) ; r e t u r n0 ; } O u t p u t : I nL I N U XG C Cc o m p i l e r 768 I nT U R B OC 766 H i n t s :I nT u r b ocp a r a m e t e ri sp a s s e df r o mr i g h tt ol e f ti np r i n t f f u n c t i o nb u tn o ti nt h eL i n u x .
C TUTORIAL
Memory mapping tutorial in c Variables tutorial in c Data types tutorial in c Storage classes tutorial in c
( 2 ) W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c c o m p i l e ri nL i n u x ? # i n c l u d e < s t d i o . h > i n tm a i n ( ) { i n ta = 5 , b = 1 0 , c = 1 5 , d = 2 0 ;
1/6
www.cquestions.com/2012/02/c-linux-interview-questions-and-answers.html
10/10/12
Looping tutorial in c Pointers tutorial in c Function tutorial in c Array tutorial in c Preprocessor tutorial in c Advanced c tutorial
C Linux interview questions and answers
p r i n t f ( " % d% d% d " ) ; r e t u r n0 ;
O u t p u t : I nL I N U XG C Cc o m p i l e r G a r b a g ev a l u e s I nT U R B OC 51 01 5 H i n t s :L o c a lv a r i a b l e ss t o r e si nt h es t a c k .
POPULAR POSTS
C program examples QUICK SORT USING C PROGRAM C interview questions and answers C multiple choice questions and answers pdf TO FIND FIBONACCI SERIES USING C PROGRAM Find out the perfect number using c program Tricky c questions and answers Data type questions in c SELECTION SORT USING C PROGRAM TO FIND FACTORIAL OF A NUMBER USING C PROGRAM
( 3 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c c o m p i l e ri nL i n u x ? # i n c l u d e < s t d i o . h > i n tm a i n ( ) { i n ti = 5 , j = 5 , y ; i n tx = + + i++ + i++ + i ; y = + + j++ + j++ + j ; p r i n t f ( " % d % d % d% d " , x , y , i , j ) ; r e t u r n0 ; } O u t p u t : I nL I N U XG C Cc o m p i l e r 2 2 2 2 8 8 I nT U R B OC 2 1 2 4 8 8
( 4 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c c o m p i l e ri nL i n u x ? # i n c l u d e < s t d i o . h > i n tm a i n ( ) { i n t n e a r* p ; i n t f a r* q ; i n t h u g e* r ; p r i n t f ( " % d % d % d " , s i z e o f ( p ) , s i z e o f ( q ) , s i z e o f ( r ) ) ; r e t u r n0 ; } O u t p u t : I nL I N U XG C Cc o m p i l e r C o m p i l a t i o ne r r o r I nT U R B OC 2 4 4
SUBSCRIBE VIA EMAIL
Enter your email address:
Subscribe
Delivered by FeedBurner
C PROGRAMMING QUESTIONS AND ANSWER
C questions and answers Debugging questions in c with answers Aptitude questions and answers in c C basic questions Multiple choice questions in c
STANDARD OF QUESTIONS ? Excellent Good Avg Worst Vote Show results
N o t e :I nL i n u xt h e r ei sn o ta n yc o n c e p to fn e a r ,f a ra n dh u g ep o i n t e
( 5 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c c o m p i l e ri nL i n u x ? # i n c l u d e < s t d i o . h > i n tm a i n ( ) { c h a r* p ; i n t* q ; f l o a t* * r ; p r i n t f ( " % d % d % d " , s i z e o f ( p ) , s i z e o f ( q ) , s i z e o f ( r ) ) ; r e t u r n0 ; } O u t p u t : I nL I N U XG C Cc o m p i l e r 4 4 4 I nT U R B OC 2 2 2
Votes so far: 4569 Days left to vote: 64
SUBSCRIBE TO
Posts Comments
H i n t s :s i z eo fa n yt y p eo fp o i n t e ri nL i n u xi s4a n di nt u r b oci s2
MY HEADLINES
C programming questions and answer C questions and answers
( 6 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c c o m p i l e ri nL i n u x ? # i n c l u d e < s t d i o . h >
2/6
www.cquestions.com/2012/02/c-linux-interview-questions-and-answers.html
10/10/12
Debugging questions in c with answers Aptitude questions and answers in c C basic questions Multiple choice questions in c Objective questions of c Program in c language Simple program example in c language Tricky c questions and answers C programming online test C Linux interview questions and answers Looping questions in c and answers C string questions and answers with explanation C operator questions with answers Check the given number is palindrome number or not using c program C pointers questions Data type questions in c Check given number is prime number or not using c program struct bit fields questions in c C questions answers C interview questions and answers How to test palindrome in c++ Palindrome number in c++ Program of palindrome number in c++ C++ code to get sum of all odd numbers in given range
C Linux interview questions and answers
i n tm a i n ( ) { s h o r ti n ta = 5 ; i n tb = 5 ; l o n gi n tc = 5 l ; f l o a td = 5 . 0 f ; d o u b l ee = 5 . 0 ; l o n gd o u b l ef = 5 . 0 L ; c h a rg = ' 5 ' ; p r i n t f ( " S i z eo fs h o r ti n t :% d \ n " , s i z e o f ( a ) ) ; p r i n t f ( " S i z eo fi n t :% d \ n " , s i z e o f ( b ) ) ; p r i n t f ( " S i z eo fl o n gi n t :% d \ n " , s i z e o f ( c ) ) ; p r i n t f ( " S i z eo ff l o a t :% d \ n " , s i z e o f ( d ) ) ; p r i n t f ( " S i z eo fd o u b l e :% d \ n " , s i z e o f ( e ) ) ; p r i n t f ( " S i z eo fl o n gd o u b l e :% d \ n " , s i z e o f ( f ) ) ; p r i n t f ( " S i z eo fc h a r :% d \ n " , s i z e o f ( g ) ) ; r e t u r n0 ; } O u t p u t : I nL I N U XG C Cc o m p i l e r S i z eo fs h o r ti n t :2 S i z eo fi n t :4 S i z eo fl o n gi n t :4 S i z eo ff l o a t :4 S i z eo fd o u b l e :8 S i z eo fl o n gd o u b l e :1 2 S i z eo fc h a r :1 I nT U R B OC S i z eo fs h o r ti n t :2 S i z eo fi n t :2 S i z eo fl o n gi n t :4 S i z eo ff l o a t :4 S i z eo fd o u b l e :8 S i z eo fl o n gd o u b l e :1 0 S i z eo fc h a r :1
ABOUT ME
ritesh kumar View my complete profile
( 7 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c c o m p i l e ri nL i n u x ? # i n c l u d e < s t d i o . h > i n tm a i n ( ) { i n ta = 3 0 0 ; c h a r* p = ( c h a r* ) & a ; p r i n t f ( " % d \ n " , * p ) ; p r i n t f ( " % d " , * + + p ) ; r e t u r n0 ; } O u t p u t : I nL I N U XG C Cc o m p i l e r 4 4 1 I nT U R B OC 4 4 1
Ads by Google
Java Linux Java Programming C C++ Programming
( 8 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c c o m p i l e ri nL i n u x ? # i n c l u d e < s t d i o . h > i n tm a i n ( ) { c h a rc = ' A ' ; p r i n t f ( " % d % d " , s i z e o f ( c ) , s i z e o f ( ' A ' ) ) ; r e t u r n0 ; } O u t p u t : I nL I N U X 1 4 I nT U R B OC 1 2
( 9 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c c o m p i l e ri nL i n u x ?
www.cquestions.com/2012/02/c-linux-interview-questions-and-answers.html 3/6
10/10/12
C Linux interview questions and answers
# i n c l u d e < s t d i o . h > i n tm a i n ( ) { e n u mc o l o r { R E D , B L U E , G R E E N = 2 , Y E L L O W , P I N K } ; p r i n t f ( " % d % d " , B L U E , P I N K ) ; r e t u r n0 ; } O u t p u t : I nL I N U XG C Cc o m p i l e r 10 I nT U R B OC 10
( 1 0 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c o m p i l e ri nL i n u x ? # i n c l u d e < s t d i o . h > i n tm a i n ( ) { c h a rc = 1 2 7 ; p r i n t f ( " % d " , + + c ) ; p r i n t f ( " % d " , + + c ) ; r e t u r n0 ; } O u t p u t : I nL I N U XG C Cc o m p i l e r 1 2 81 2 7 I nT U R B OC 1 2 81 2 7 H i n t s :c h a rd a t at y p ec y c l i cp r o p e r t y .
( 1 1 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c o m p i l e ri nL i n u x ? # i n c l u d e " s t d i o . h " s t r u c ti n f o 1 { c h a r* t i t l e ; l o n gi n ts i z e ; d o u b l eg r a d e ; } h e r o 1 ; u n i o ni n f o 2 { c h a r* t i t l e ; l o n gi n ts i z e ; d o u b l eg r a d e ; } h e r o 2 ; i n tm a i n ( ) { p r i n t f ( " S i z eo fs t r u c t u r e :% d \ n " , s i z e o f ( h e r o 1 ) ) ; p r i n t f ( " S i z eo fu n i o n : % d " , s i z e o f ( h e r o 2 ) ) ; r e t u r n0 ; } O u t p u t : I nL I N U XG C Cc o m p i l e r S i z eo fs t r u c t u r e :1 6 S i z eo fu n i o n : 8 I nT U R B OC S i z eo fs t r u c t u r e :1 4 S i z eo fu n i o n : 8
( 1 2 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c o m p i l e ri nL i n u x ? # d e f i n es i z e ( x )( c h a r* ) ( x + 1 ) ( c h a r* ) x # i n c l u d e < s t d i o . h > i n tm a i n ( ) { l o n gi n t* p ; l o n gd o u b l e* q ; p r i n t f ( " S i z eo fl o n gi n t :% d \ n " , s i z e ( p ) ) ; p r i n t f ( " S i z eo fl o n gd o u b l e :% d " , s i z e ( q ) ) ; r e t u r n0 ; } O u t p u t :
www.cquestions.com/2012/02/c-linux-interview-questions-and-answers.html 4/6
10/10/12
C Linux interview questions and answers
I nL I N U XG C Cc o m p i l e r S i z eo fl o n gi n t :4 S i z eo fl o n gd o u b l e :1 2 I nT U R B OC S i z eo fl o n gi n t :4 S i z eo fl o n gd o u b l e :1 0
( 1 3 )W h a tw i l lb eo u t p u ti fy o uw i l le x e c u t ef o l l o w i n gp r o g r a mb yg c c o m p i l e ri nL i n u x ? # i n c l u d e < s t d i o . h > i n tm a i n ( ) { i n ti = 2 , j = 5 , k = 3 ; i n ta = i & & j > = k ; p r i n t f ( " % d " , a ) ; r e t u r n0 ; }
O u t p u t : I nL I N U XG C Cc o m p i l e r 1 I nT U R B OC 1 H i n t s :A n yc o n d i t i o n a lo rr e l a t i o n a lo p e r a t o rr e t u r n s1i fc o n d i t i o n t r u eo t h e r w i s ei tr e t u r n s0 .
I f y o u h a v e a n y q u e r i e s o r s u g g e s t i o n s i n a b o v e c L i n u x i n t q u e s t i o n s ,p l e a s es h a r ei t .
5 comments:
Imran Mirza said... Very Useful Tutorial 2/9/12 11:39 PM
Anonymous said... why answer of 1st question is 7 6 8 in linux . what is the concept behind it. 3/30/12 3:01 PM
Bijoooos said...
(a++, a++, ++a) means it starts from right-side , ++a will increment a value and replaces the final value of a, now and next expr a++ increment a and replaces previous value of a ( 6 ), now a= 7, next a++ also increment a and replaces previous value of a (7), now a=8, that value in place of ++a, whenever ++a is coming all will replaced by final value of a 4/3/12 1:19 AM
kibrom gebre said... would you clarify me why the output of question number 3 is 22 22 8.Thanks! 6/28/12 4:41 AM
Anonymous said... Could any one please clarify the post fix and pre fix argument evaluation . 7/2/12 9:06 PM Post a Comment
Links to this post
Create a Link Newer Post Subscribe to: Post Comments (Atom) Home
www.cquestions.com/2012/02/c-linux-interview-questions-and-answers.html
5/6
10/10/12
C Linux interview questions and answers
SHARE IT Share this on Facebook Tweet this
View stats
(NEW) Appointment gadget >>
MUST VISIT
Grab this Headline Animator
Ads by Google
C++ Interview C for Linux
C COMPILER: GCC 4.1.2
codepad
[ create a new paste ]
login
Language: C
# i n c l u d e< s t d i o . h > i n tm a i n ( i n ta r g c ,c h a r* a r g v [ ] ) { r e t u r n0 ; }
Private [?]
Run code Submit
C LOVER COMMUNITY
Join this site
w ith Google Friend Connect
Members (1938) More
Already a member? Sign in
Help the community by publishing your posts Copyright@ritesh kumar. Powered by Blogger.
www.cquestions.com/2012/02/c-linux-interview-questions-and-answers.html
6/6