0 votes 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? Spider1896 asked Aug 21, 2018 Spider1896 319 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply Shaik Masthan commented Aug 21, 2018 reply Follow Share c[i]="a"; c[i] can hold the character but not the memory address 0 votes 0 votes srestha commented Aug 21, 2018 reply Follow Share here a is not character, I think it is a string 0 votes 0 votes Spider1896 commented Aug 22, 2018 reply Follow Share Since i can't put string value then why in C programming Character array is treated as String 0 votes 0 votes Shaik Masthan commented Aug 22, 2018 reply Follow Share @Spider1896, didn't get your exact question... for running above program correctly replace c[i]="a"; with c[i]='a'; 0 votes 0 votes Please log in or register to add a comment.