Solved

Question

Posted on 2006-07-08
4
323 Views
Last Modified: 2012-05-05
Question: There is no difference between how C interprets 'x' and "X". Answer is FALSE.

WHY?
0
Comment
Question by:dandeliondream
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Author Comment

by:dandeliondream
ID: 17067082
sorry i mean...

There is no difference between how C interprets 'x' and "x".  Why?
0
 
LVL 24

Accepted Solution

by:
fridom earned 50 total points
ID: 17067091
There is a fundamental difference:
'x' is  char
"x" is a "string" correctly a field of chars and looks like this [x, '\0#]

So they completly different. Trying to hand over a char* instead of a char will give you
another idea about that.

Regards
Friedrich
0
 
LVL 11

Expert Comment

by:cup
ID: 17067144
It is easy to get confused about this if you come from a HTML, Javascript or Fortran background where primes ' and quotes " mean the same thing.
0
 
LVL 3

Author Comment

by:dandeliondream
ID: 17067280
Thanks fridom.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question