what is difference between array of characters and string
Answer Posted / shayan
the main difference between array of char and string is that when we declare array of char like char name[6],in this case for example shayan s is stored in 0 index and last character is n which is at 5 index but i delared 6 because 6th index is of null character which is neccesary to declare but in string it will automatically declare by the compiler like "shayan" after n compiler automatically put \0 after n.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
What are terms in math?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
How many levels of indirection in pointers can you have in a single declaration?
Why c is known as a mother language?
Is there a built-in function in C that can be used for sorting data?
Why can arithmetic operations not be performed on void pointers?
In a switch statement, explain what will happen if a break statement is omitted?
What is the use of header files?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
What are the two types of structure?
Which type of language is c?
What is define directive?
What are c header files?