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 this infamous null pointer, anyway?
How can you find the exact size of a data type in c?
What does the c preprocessor do?
What are two dimensional arrays alternatively called as?
Why c language?
What happens if header file is included twice?
What should malloc() do?
Can you please explain the difference between syntax vs logical error?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
Explain what is the benefit of using enum to declare a constant?
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
What is main () in c language?
In c language can we compile a program without main() function?
When should the volatile modifier be used?
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.