#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

Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above

5 Answers   Accenture, TCS,


Tell us the difference between these two : #include"stdio.h" #include<stdio.h> define in detial.

5 Answers  


Explain what is output redirection?

0 Answers  


Explain is it valid to address one element beyond the end of an array?

0 Answers  


WHAT IS PRE POSSESSORS?

6 Answers   TATA,






How do you initialize function pointers? Give an example?

3 Answers  


write a program to produce the following output; ABCDEFGFEDCBA ABCDEF FEDCBA ABCDE EDCBA ABCD DCBA ABC CBA AB BA A A

17 Answers   ABC, College School Exams Tests,


I need a sort of an approximate strcmp routine?

0 Answers  


Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.

3 Answers   SilverKey,


what is the difference between procedure oriented and object oriented progaming language

1 Answers  


how to write a prog in c to convert decimal number into binary by using recursen function,

1 Answers  


while initialization of array why we use a[][2] why not a[2][]...?

0 Answers   Aptech,


Categories