#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 do you convert strings to numbers in C?

695


What is meant by initialization and how we initialize a variable?

577


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

2670


What are types of functions?

553


What is the full form of getch?

571






Explain what is the purpose of "extern" keyword in a function declaration?

609


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

641


Explain a pre-processor and its advantages.

610


What is getch c?

841


What is #define used for in c?

601


How can you increase the size of a dynamically allocated array?

633


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

1421


What is header file definition?

558


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

678


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

701