#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

I need a sort of an approximate strcmp routine?

0 Answers  


What is the c value paradox and how is it explained?

0 Answers  


Write a program that accepts a string where multiple spaces are given in between the words. Print the string ignoring the multiple spaces. Example: Input: “ We.....Are....Student “ Note: one .=1 Space Output: "We Are Student"

6 Answers   IBM,


What do you mean by team??

5 Answers   Student,


Identify the operators that is not used with pointer a. && b. # c. * d. >>

2 Answers  


How do you write a program which produces its own source code as output?

0 Answers  


how to find sum of 5 digits in C?

4 Answers  


How would you write qsort?

1 Answers  


Where register variables are stored in c?

0 Answers  


What is the use of void pointer and null pointer in c language?

0 Answers  


What are logical errors and how does it differ from syntax errors?

0 Answers  


Is register a keyword in c?

0 Answers  


Categories