#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

let's take a code struct FAQ { int a; char b; float c; double d; int a[10]; }*temp; now explain me how the memory will be allocated for the structure FAQ and what address will be in the structure pointer (temp)....................

8 Answers  


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

0 Answers  


void main() { //char ch; unsigned char ch; clrscr(); for(ch =0;ch<= 127; ch++) printf(" %c= %d \t ", ch, ch); } output?

4 Answers   Groupon,


What are the difference between a free-standing and a hosted environment?

0 Answers   Infogain,


How can I write a function analogous to scanf?

0 Answers  






Switch (i) i=1; case 1 i++; case 2 ++i; break; case 3 --i; Output of i after executing the program

5 Answers   Mascot,


Why do we need functions in c?

0 Answers  


sir i got 146 correct question & i have also the advantage of height so will they consider my marks as 146+3=149.can any body tell me how they consider my height marks.

1 Answers  


What is the use of gets and puts?

0 Answers  


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

0 Answers  


Is javascript written in c?

0 Answers  


In scanf h is used for

4 Answers   BFL,


Categories