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       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
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);
}
Find the output
 Question Submitted By :: Guest
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); } Find the output
Answer
# 1
error
 
Is This Answer Correct ?    5 Yes 0 No
Guest
 
  Re: #include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } Find the output
Answer
# 2
ncompatible types in assignment of `s2' to `s1'
 
Is This Answer Correct ?    1 Yes 0 No
Mahadev Shinde
 
 
 
  Re: #include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } Find the output
Answer
# 3
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 ?    3 Yes 0 No
Vignesh1988i
 
  Re: #include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } Find the output
Answer
# 4
Lvalue error. 

if      char *s1="Ramco";
        char *s2="Systems";
        s1=s2;      is used

       ans: Systems
 
Is This Answer Correct ?    2 Yes 0 No
Geo
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15 Wipro8
What is a far pointer?What is the utility?  2
How would you print out the data in a binary tree, level by level, starting at the top? Microsoft4
write a function to find whether a string is palindrome or not and how many palindrome this string contain?  1
what about "char *(*(*a[])())();" Oracle2
what is the output of the following program? main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }  7
WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?  6
In the following control structure which is faster? 1.Switch 2.If-else and which consumes more memory?  4
Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line. Subex2
What is alloca() and why is its use discouraged?  1
How can I set an array's size at run time?  7
2. Counting in Lojban, an artificial language developed over the last fourty years, is easier than in most languages The numbers from zero to nine are: 0 no 1 pa 2 re 3 ci 4 vo 5 mk 6 xa 7 ze 8 bi 9 so Larger numbers are created by gluing the digit togather. For Examle 123 is pareci Write a program that reads in a lojban string(representing a no less than or equal to 1,000,000) and output it in numbers. Nagarro2
How to receive strings with spaces in scanf()  4
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
which header file contains main() function in c? TCS3
Tell us the difference between these two : #include"stdio.h" #include<stdio.h> define in detial.  4
Print all the palindrome numbers.If a number is not palindrome make it one by attaching the reverse to it. eg:123 output:123321 (or) 12321  2
How to find the given no is odd or even without checking of any condition and loops. (Hint: Using array)  4
What is the result main() { char c=-64; int i=-32 unsigned int u =-16; if(c>i){ printf("pass1,"); if(c<u) printf("pass2"); else printf("Fail2");} else printf("Fail1); if(i<u) printf("pass2"); else printf("Fail2") } a)Pass1,Pass2 b)Pass1,Fail2 c)Fail1,Pass2 d)Fail1,Fail2 e)none IBM7
array contains zeros and ones as elements.we need to bring zeros one side and one other side in single parse. ex:a[]={0,0,1,0,1,1,0,0} o/p={0,0,0,0,0,1,1,1} Motorola7
 
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