Go through the following code sinippet
char a[20];
a="Hello Orcale Test";
will this compile?
Answer Posted / vignesh1988i
the above variable 'a' is a character array , so i would not been wrong if it has been initilized on the same line.....
but they have done that in the next line , there lies the mistake... THIS PROGRAM WILL GIVE AN ERROR why because we cant copy the entire string in a single travel by using '='(assignment) operator unless it's an initilization directly/.....
thank u
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a program to print all permutations of a given string.
Why is main function so important?
what do the 'c' and 'v' in argc and argv stand for?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
how do you programme Carrier Sense Multiple Access
What is header file in c?
Can we add pointers together?
writ a program to compare using strcmp VIVA and viva with its output.
How the c program is executed?
Why #include is used in c language?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
code for find determinent of amatrix
List the difference between a While & Do While loops?
Apart from dennis ritchie who the other person who contributed in design of c language.
what type of questions arrive in interview over c programming?