void main()

{

char ch;

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

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

}



void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c ..

Answer / susie

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 ?    8 Yes 1 No

Post New Answer

More C Code Interview Questions

x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);

2 Answers  


write a program for area of circumference of shapes

0 Answers  


Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 Answers  


Write a single line c expression to delete a,b,c from aabbcc

2 Answers   Microsoft,


How we will connect multiple client ? (without using fork,thread)

3 Answers   TelDNA,






void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(“%d”,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(“%d”,*cptr); }

1 Answers  


find simple interest & compund interest

2 Answers  


#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s=malloc(sizeof(struct xx)); printf("%d",s->x); printf("%s",s->name); }

1 Answers   TCS,


How can I Create a C program in splitting set of characters to specific subsets. Example: INPUT SET OF CHARACTERS: Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain. SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10 OUTPUT: Therefore, my dear b rothers an d sisters, stand fir m. Let not hing move you. Alway s give you rselves fu lly to the work of t he Lord, b ecause you know that your labo r in the L ord is not in vain.

0 Answers  


#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }

1 Answers  


int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().

2 Answers  


main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }

1 Answers  


Categories