#include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}

what will happen if you executed this code?

Answer Posted / sheetal

error will occur for l-value as left operand should be
pointer instead of array. Since assignment is always done
to pointer.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of errors are there in c language? Explain

758


What are the benefits of c language?

871


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1693


main() { printf("hello"); fork(); }

948


What is new line escape sequence?

1029


What is the maximum no. of arguments that can be given in a command line in C.?

893


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

841


What is function and its example?

898


Here is a neat trick for checking whether two strings are equal

790


What is #include stdlib h?

856


What is the difference between far and near in c?

805


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2638


What is meant by inheritance?

847


What is the collection of communication lines and routers called?

859


How do you view the path?

884