Answer to Question #5827 in C++ for kuldeep

Question #5827
How to initialise a char variable name kuldeep
1
Expert's answer
2012-01-05T08:15:58-0500
To initialize a char variable we use this expression:
char name = 's';
In this case we'll get a variable name, which contains symbol 's' as a value.
We can use any name we want for a variable, it is only not allowed to use number as a first symbol. For example, we can't initialize or declare a variable named& 4var.
To initialize an array of char we use this expression:
char* name = 'kuldeep';
In this case we create a pointer to the first symbol and variable name contains the word 'kuldeep'.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS