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

program to find which character is occured more times in a string and how many times it has occured? for example in the sentence "i love india" the output should be i & 3.

3 Answers  


What is cohesion and coupling in c?

0 Answers  


1 1 12 21 123 321 12344231 how i creat it with for loop??

1 Answers  


What happens if header file is included twice?

0 Answers  


#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }

1 Answers   Vector India,






value = 0xabcd; for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) { foo(); if (loop & 1) value >>= 1; } how many times is foo() executed?

6 Answers   Google,


what is the output of following question? void main() { int i=0,a[3]; a[i]=i++; printf("%d",a[i] }

3 Answers  


code for selection sort?

1 Answers  


write a code for large nos multilication (upto 200 digits)

2 Answers   Persistent,


what is pointer ? what is the use of pointer?

6 Answers   Infosys,


Why can't we initialise member variable of a strucutre

1 Answers  


#include<stdio.h> void main() { int =1; printf("%d%d%d",a++,++a,++a); }

3 Answers   VB,


Categories