#include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
what will happen if you executed this code?
Answers were Sorted based on User's Feedback
Answer / guest
error wud pop up because u cannot assign arrats or strings
to one another
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / ramesh
u will get error like incompatible types in assignment
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / 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 |
How is pointer initialized in c?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
different between overloading and overriding
Is null always equal to 0(zero)?
What is the difference between c &c++?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
What is variable and explain rules to declare variable in c?
/*what is the output for the code*/ void main() { int r; r=printf("naveen"); r=printf(); printf("%d",r); getch(); }
Write a program to find the number of times that a given word(i.e. a short string) occurs in a sentence (i.e. a long string!). Read data from standard input. The first line is a single word, which is followed by general text on the second line. Read both up to a newline character, and insert a terminating null before processing. Typical output should be: The word is "the". The sentence is "the cat sat on the mat". The word occurs 2 times.
Did c have any year 2000 problems?
What does #pragma once mean?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?