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 are nested functions in c?
What is the difference between a free-standing and a hosted environment?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
Explain modulus operator.
Can a void pointer point to a function?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
What are the different types of pointers used in c language?
What is the purpose of & in scanf?
What is page thrashing?
When should volatile modifier be used?
What is structure in c definition?
write a program to print largest number of each row of a 2D array
Why do we use header files in c?
Explain what is meant by high-order and low-order bytes?
What's a good way to check for "close enough" floating-point equality?