main()
{char a[10]={1,2,3,4,5,6};int x;
for(x=0;x<4;x++){ b[x]=x+'a';}
printf("%s",b);}

Answers were Sorted based on User's Feedback



main() {char a[10]={1,2,3,4,5,6};int x; for(x=0;x<4;x++){ b[x]=x+'a';} printf(&qu..

Answer / vignesh1988i

1 st prob.. this will be an error since b[] have not been
declared.......

if you are nt bothered about the syntax obligations....
then the output will be:

abcd

Is This Answer Correct ?    5 Yes 0 No

main() {char a[10]={1,2,3,4,5,6};int x; for(x=0;x<4;x++){ b[x]=x+'a';} printf(&qu..

Answer / lucky

it gives compilation error bcoz b is not defined

Is This Answer Correct ?    4 Yes 1 No

main() {char a[10]={1,2,3,4,5,6};int x; for(x=0;x<4;x++){ b[x]=x+'a';} printf(&qu..

Answer / guest

abcd56

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

marge linklist

0 Answers   HCL,


the question is that what you have been doing all these periods (one year gap)

0 Answers   HCL,


What is assert and when would I use it?

0 Answers  


WHAT IS HEADER?

8 Answers   ProKarma, TCS,


List some of the static data structures in C?

0 Answers  






Write a c program to print the sizes and ranges of different data types in c?

1 Answers  


Why header file is used in c?

0 Answers  


What are bit fields? What is their use?

2 Answers   Adobe,


Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

0 Answers   Expedia,


long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes

18 Answers   Acropolis, HCL, Intel, TCS,


In a switch statement, what will happen if a break statement is omitted?

0 Answers  


what does data structure mean?

8 Answers  


Categories