ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
void main()
{
 char far *farther,*farthest;
  
 printf("%d..%d",sizeof(farther),sizeof(farthest));
   
 }
 Question Submitted By :: Surenda Pal Singh Chouhan
I also faced this Question!!     Rank Answer Posted By  
 
  Re: void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
Answer
# 1
4..2  

Explanation:
            the second pointer is of char type and not a 
far pointer
 
Is This Answer Correct ?    19 Yes 1 No
Surenda Pal Singh Chouhan
 
  Re: void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
Answer
# 2
syntax error before '*' token
 error: `farther' undeclared (first use in this function)
 error: `farthest' undeclared (first use in this function)
 
I am getting these types of errors how u get 4 and 2 i
didn't understood
 
Is This Answer Correct ?    2 Yes 8 No
Basha
 
 
 
  Re: void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
Answer
# 3
Some explanation first:
far pointers are outdated concepts from C, and are actually
compiler extentions, so you might get compiler errors trying
to use far pointers on some compilers.
In the program above, 
farther's type - FAR pointer to char
farthest's type - near pointer to char
now, the difference in size of those stems from the fact
that far pointers consist of the segment and offset
together, while near pointers just have the offset. 
Near pointers thus have size of 2 (just the offset), while
far pointers - size of 4 bytes.
 
Is This Answer Correct ?    7 Yes 0 No
Jaroosh
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
how can i get output like this? 1 2 3 4 5 6 Excel3
what is the benefit of c30  1
How do we swap or interchange any 2 numbers without using Temporary variable...Anybody can pls answer it.. Thanks in Advance  7
void main() { int i=5; printf("%d",i+++++i); } ME12
What should be keep precautions while using the recursion method?  1
what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green") Cadence4
What is encapsulation?  1
What is false about the following A compound statement is a.A set of simple statments b.Demarcated on either side by curly brackets c.Can be used in place of simple statement d.A C function is not a compound statement. TCS1
What is the memory allocated by the following definition ? int (*x)(); ADITI2
Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen) NetApp1
what is real time system?what is the differance between hard and soft real time systems  2
What do you mean by team??  2
what is the difference b/w compiler and debugger? Assurgent1
Which of the following is not a valid declaration for main ()? 1) int main() 2) int main(int argc, char *argv[]) 3) They both work  2
write a program to print the all 4digits numbers & whose squares must me even numbers? Virtusa2
AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST? HCL12
what is compiler  5
main() { int a = 65; printf(“%d %o %x”,a,a,a); } Output 65 101 41 Please explain me.How it is coming like that? Excel2
main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }  5
How many ways are there to swap two numbers without using temporary variable? Give the each logic.  6
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com