1 Replies - 248 Views - Last Post: 23 August 2019 - 04:07 AM Rate Topic: -----

#1 Caedmon   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 23-August 19

I am having an error in array in C language.

Posted 23 August 2019 - 03:49 AM

The compiler says that there are errors in
Line 6 and line 13. Can you please explain to me what I am doing wrong and how I can correct my mistake? Thank you very much.

Attached image(s)

  • Attached Image

Is This A Good Question/Topic? 0
  • +

Replies To: I am having an error in array in C language.

#2 Salem_c   User is online

  • void main'ers are DOOMED
  • member icon

Reputation: 2380
  • View blog
  • Posts: 4,515
  • Joined: 30-May 10

Re: I am having an error in array in C language.

Posted 23 August 2019 - 04:07 AM

Use "" and not '' for character strings.
Eg
char food[] = "tuna";

Single quotes are for single letters, like
char c = 'q';
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1