#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
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 |
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 |
Answer / mahadev shinde
ncompatible types in assignment of `s2' to `s1'
Is This Answer Correct ? | 2 Yes | 0 No |
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 |
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)....................
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
void main() { //char ch; unsigned char ch; clrscr(); for(ch =0;ch<= 127; ch++) printf(" %c= %d \t ", ch, ch); } output?
What are the difference between a free-standing and a hosted environment?
How can I write a function analogous to scanf?
Switch (i) i=1; case 1 i++; case 2 ++i; break; case 3 --i; Output of i after executing the program
Why do we need functions in c?
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.
What is the use of gets and puts?
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.
Is javascript written in c?
In scanf h is used for