#include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Find the output
Answers were Sorted based on User's Feedback
Answer / vignesh1988i
it will be an error as for as i know... since s1 is not a
pointer variable... but however array are implict
pointers.... here we cant assign the base address to
another arry which is capable of holding oly values not
addressses...............
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / geo
Lvalue error.
if char *s1="Ramco";
char *s2="Systems";
s1=s2; is used
ans: Systems
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / mahadev shinde
ncompatible types in assignment of `s2' to `s1'
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ankit garg
it will give an error bcoz here we do not give the header
file for string ( #include<string.h>) ... and we can not
use the string without it....
| Is This Answer Correct ? | 1 Yes | 2 No |
Differentiate between a for loop and a while loop? What are it uses?
Why is c called "mother" language?
helllo sir give me some information of the basic information the c as printf ,scanf , %d ,%f and why is the main use of these.
How can you increase the size of a statically allocated array?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
What is the difference between a string and an array?
What is the difference between File pointer and Internal Charecter Pointer?
How does #define work?
what will happen if you free a pointer twice after allocating memory dynamically ?
differentiate between const char *a; char *const a; and char const *a;
2 Answers College School Exams Tests, HCL, TCS,
Example of friendly function in c++