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

What is the symbol indicated the c-preprocessor?

924


Write a program to use switch statement.

858


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

1120


How does normalization of huge pointer works?

862


Why should I prototype a function?

819


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

884


What is the use of a ‘’ character?

796


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

833


What are enumerated types?

833


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

2931


What is the scope of static variables in c language?

822


What are pointers?

837


Explain what is the benefit of using enum to declare a constant?

808


What is define c?

765


What are identifiers c?

822