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

Write a program to print all permutations of a given string.

638


Why is main function so important?

611


what do the 'c' and 'v' in argc and argv stand for?

642


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

669


how do you programme Carrier Sense Multiple Access

1510






What is header file in c?

602


Can we add pointers together?

612


writ a program to compare using strcmp VIVA and viva with its output.

1519


How the c program is executed?

629


Why #include is used in c language?

594


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"

1580


code for find determinent of amatrix

1511


List the difference between a While & Do While loops?

630


Apart from dennis ritchie who the other person who contributed in design of c language.

803


what type of questions arrive in interview over c programming?

1551