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       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Code Snippets  >>  Programming Code  >>  C Code
 
 


 

 
 C Code interview questions  C Code Interview Questions
 C++ Code interview questions  C++ Code Interview Questions
 VC++ Code interview questions  VC++ Code Interview Questions
 Java Code interview questions  Java Code Interview Questions
 Dot Net Code interview questions  Dot Net Code Interview Questions
 Visual Basic Code interview questions  Visual Basic Code Interview Questions
 Programming Code AllOther interview questions  Programming Code AllOther Interview Questions
Question
main()

   {

	  printf("%x",-1<<4);

   }
 Question Submitted By :: Susie
I also faced this Question!!     Rank Answer Posted By  
 
  Re: main() { printf("%x",-1<<4); }
Answer
# 1
Answer :  

      fff0

      Explanation :

            -1 is internally represented as all 1's. When
left shifted four times the least significant 4 bits are
filled with 0's.The %x format specifier specifies that the
integer value be printed as a hexadecimal value.
 
Is This Answer Correct ?    1 Yes 0 No
Susie
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); }  1
Link list in reverse order. NetApp7
main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }  1
how to delete an element in an array  1
void func1(int (*a)[10]) { printf("Ok it works"); } void func2(int a[][10]) { printf("Will this work?"); } main() { int a[10][10]; func1(a); func2(a); } a. Ok it works b. Will this work? c. Ok it worksWill this work? d. None of the above HCL1
String reverse with time complexity of n/2 with out using temporary variable. NetApp8
String copy logic in one line. NetApp9
main() { char *p="GOOD"; char a[ ]="GOOD"; printf("\n sizeof(p) = %d, sizeof(*p) = %d, strlen(p) = %d", sizeof(p), sizeof(*p), strlen(p)); printf("\n sizeof(a) = %d, strlen(a) = %d", sizeof(a), strlen(a)); }  1
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }  1
Finding a number multiplication of 8 with out using arithmetic operator NetApp8
write a program to Insert in a sorted list Microsoft4
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped IBM1
main() { clrscr(); } clrscr();  1
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }  1
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }  1
void main() { int const * p=5; printf("%d",++(*p)); }  1
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }  1
Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])  1
#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }  1
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }  1
 
For more C Code 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