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
What is the symbol indicated the c-preprocessor?
Write a program to use switch statement.
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
How does normalization of huge pointer works?
Why should I prototype a function?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What is the use of a ‘’ character?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
What are enumerated types?
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
What is the scope of static variables in c language?
What are pointers?
Explain what is the benefit of using enum to declare a constant?
What is define c?
What are identifiers c?