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   SiteMap shows list of All Categories in this site.
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
void main()

      {

      char ch;

      for(ch=0;ch<=127;ch++)

      printf(“%c   %d \n“, ch, ch);

      }
 Question Submitted By :: Susie
I also faced this Question!!     Rank Answer Posted By  
 
  Re: void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c %d \n“, ch, ch); }
Answer
# 1
Answer :  

      	Implementaion dependent

      Explanation:

The char type may be signed or unsigned by default. If it is
signed then ch++ is executed after ch reaches 127 and
rotates back to -128. Thus ch is always smaller than 127.
 
Is This Answer Correct ?    0 Yes 0 No
Susie
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }  1
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }  1
Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable, but aac or bcd are unacceptable. Microsoft5
main() { extern int i; i=20; printf("%d",i); }  1
int aaa() {printf(“Hi”);} int bbb(){printf(“hello”);} iny ccc(){printf(“bye”);} main() { int ( * ptr[3]) (); ptr[0] = aaa; ptr[1] = bbb; ptr[2] =ccc; ptr[2](); }  1
how to return a multiple value from a function? Wipro2
main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }  1
write a program in c to merge two array  1
What are the files which are automatically opened when a C file is executed?  1
How do you sort a Linked List (singly connected) in O(n) please mail to pawan.10k@gmail.com if u can find an anser...i m desperate to knw... Oracle3
main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }  1
char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }  1
void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c %d \n“, ch, ch); }  1
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.  2
Link list in reverse order. NetApp7
main() { static int var = 5; printf("%d ",var--); if(var) main(); }  1
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?  1
main() { int i=5; printf("%d",++i++); }  1
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }  1
main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }  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