ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
#include<stdio.h>
main()
{
	char s1[]="Ramco";
	char s2[]="Systems";
	s1=s2;
	printf("%s",s1);
}

what will happen if you executed this code?
 Question Submitted By :: Naveed
I also faced this Question!!     Rank Answer Posted By  
 
  Re: #include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } what will happen if you executed this code?
Answer
# 1
syste
 
Is This Answer Correct ?    0 Yes 0 No
Mannucse
[Kiona]
 
  Re: #include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } what will happen if you executed this code?
Answer
# 2
error wud pop up because u cannot assign arrats or strings 
to one another
 
Is This Answer Correct ?    1 Yes 0 No
Guest
 
 
 
  Re: #include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } what will happen if you executed this code?
Answer
# 3
u will get error like incompatible types in assignment
 
Is This Answer Correct ?    0 Yes 0 No
Ramesh
 
  Re: #include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } what will happen if you executed this code?
Answer
# 4
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 0 No
Sheetal
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
what are the interview question's in the language c Nipuna1
how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y TCS3
wats the diference btwen constant pointer and pointer to a constant.pls give examples.  6
what is the code for getting the output as * ** *** Caritor5
enum day = { jan = 1 ,feb=4, april, may} what is the value of may? a)4 b)5 c)6 d)11 e)none of the above HCL2
write a program for even numbers?  8
hi how to convert program from notepad to turboc editor can u please help me  1
can we access one file to one directory?  1
Program to find the absolute value of given integer using Conditional Operators N-Tech2
what is the use of call back function in c?tell me with example  1
how to connect oracle in C/C++.  2
What is the difference between char a[] = "string"; and char *p = "string"; ? Honeywell11
program for comparing 2 strings without strcmp()  3
Give a method to count the number of ones in a 32 bit number?  1
explain about storage of union elements. Bosch2
which one is highest Priority in c? a)=,b)+,c)++,d)==  3
How to swap two values using a single variable ? condition: Not to use Array and Pointer ?  4
write a function to find whether a string is palindrome or not and how many palindrome this string contain?  1
Write a program to write a given string in maximum possibilities? i.e str[5]="reddy"; i.e we can write this string in 120 ways for that write a program Subex3
we all know about the function overloading concept used in C++ and we all learnt abt that.... but that concept is already came in C in a very smaller propotion ... my question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION OVERLOADING IS USED in C language????????????? Google2
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com