what is difference between array of characters and string
Answer Posted / zubair
String is much same as character array, it can also be
checked by each characters:
string str;for(int i=0;str[i]!='\0';i++) cout <<str[i]<<endl;
1. The NULL terminator is loaded automatically in string.('\0')
2.Both of them drop the data after space when we take input.
| Is This Answer Correct ? | 35 Yes | 4 No |
Post New Answer View All Answers
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
largest Of three Number using without if condition?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
Write a program with dynamically allocation of variable.
What is an lvalue?
What is typedef?
Why we use conio h in c?
What are pragmas and what are they good for?
What are c header files?
What is difference between Structure and Unions?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
Explain what is meant by 'bit masking'?
What are file streams?
What is the newline escape sequence?
What is a c token and types of c tokens?