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


Please Help Members By Posting Answers For Below Questions

How many levels of pointers can you have?

705


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2269


Explain what is a 'locale'?

585


How many levels of pointers have?

595


What are the different properties of variable number of arguments?

669






What is an endless loop?

804


What are header files in c?

618


What are different storage class specifiers in c?

618


diff between exptected result and requirement?

1596


What are pragmas and what are they good for?

577


What is dynamic dispatch in c++?

559


What is nested structure in c?

614


What is page thrashing?

653


Write a C program in Fibonacci series.

635


What is unary operator?

660