Answer to Question #5827 in C++ for kuldeep

Question #5827
How to initialise a char variable name kuldeep
Expert's answer
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!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog