#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



#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Sy..

Answer / guest

error

Is This Answer Correct ?    15 Yes 1 No

#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Sy..

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

#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Sy..

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

#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Sy..

Answer / mahadev shinde

ncompatible types in assignment of `s2' to `s1'

Is This Answer Correct ?    2 Yes 0 No

#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Sy..

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

Post New Answer

More C Interview Questions

What does dm mean sexually?

0 Answers  


What does 2n 4c mean?

0 Answers  


what is the code for getting the output as * ** ***

5 Answers   Caritor,


enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }

4 Answers   ME,


What is nested structure?

0 Answers  






wat are the two methods for swapping two numbers without using temp variable??

2 Answers  


What is the most efficient way to count the number of bits which are set in an integer?

0 Answers  


Explain what is operator promotion?

0 Answers  


main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); } what is the output?

10 Answers   Ramco,


What the different types of arrays in c?

0 Answers  


What is the best way to store flag values in a program?

0 Answers  


what is output of the following statetment?Printf(“%x”, -1<<4); ?

5 Answers  


Categories