0 0 votes #include<stdio.h> void main() { char c[]="abhishek"; for(int i=0;i<8;i++) { c[i]="a"; printf("%c",c[i]); } } What is the error in it? Programming in C + – Spider1896 690 views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply Shaik Masthan commented Aug 21, 2018 reply Follow flag c[i]="a"; c[i] can hold the character but not the memory address 0 0 replyShare srestha commented Aug 21, 2018 reply Follow flag here a is not character, I think it is a string 0 0 replyShare Spider1896 commented Aug 22, 2018 reply Follow flag Since i can't put string value then why in C programming Character array is treated as String 0 0 replyShare Shaik Masthan commented Aug 22, 2018 reply Follow flag @Spider1896, didn't get your exact question... for running above program correctly replace c[i]="a"; with c[i]='a'; 0 0 replyShare Please log in or register to add a comment.