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   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Code Snippets  >>  Programming Code  >>  C Code
 
 


 

 
 C Code interview questions  C Code Interview Questions
 C++ Code interview questions  C++ Code Interview Questions
 VC++ Code interview questions  VC++ Code Interview Questions
 Java Code interview questions  Java Code Interview Questions
 Dot Net Code interview questions  Dot Net Code Interview Questions
 Visual Basic Code interview questions  Visual Basic Code Interview Questions
 Programming Code AllOther interview questions  Programming Code AllOther Interview Questions
Question
String copy logic in one line.
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: String copy logic in one line.
Answer
# 1
strpy(n1,n2)
here copy of string n2 in string n1
 
Is This Answer Correct ?    0 Yes 2 No
Vijay
 
  Re: String copy logic in one line.
Answer
# 2
while(str1[i]!=0) str2[j++]=str1[i++];
 
Is This Answer Correct ?    1 Yes 2 No
Raghuram.A
 
 
 
  Re: String copy logic in one line.
Answer
# 3
for(i=0;(str2[i]=str1[i])!='\0';i++);
 
Is This Answer Correct ?    2 Yes 0 No
Lavanya
 
  Re: String copy logic in one line.
Answer
# 4
while ((*target++ = *source++));
 
Is This Answer Correct ?    3 Yes 1 No
Yash
 
  Re: String copy logic in one line.
Answer
# 5
for(i=0; str2[i] = str1[i]; i++);
 
Is This Answer Correct ?    1 Yes 1 No
Shruthirap
 
  Re: String copy logic in one line.
Answer
# 6
strcpy(s1,s2); //copies string s1 to s2
 
Is This Answer Correct ?    0 Yes 0 No
Rajendra
 
  Re: String copy logic in one line.
Answer
# 7
void cpy_user(char *s, char *t)
{
while ((*s++ = *t++) != '\0');
}
 
Is This Answer Correct ?    1 Yes 0 No
Jitendra
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
write a program to Insert in a sorted list Microsoft4
How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.  1
Print an integer using only putchar. Try doing it without using extra storage.  1
String reverse with time complexity of n/2 with out using temporary variable. NetApp7
Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. Microsoft8
How do you write a program which produces its own source code as its output?  4
plz send me all data structure related programs  2
program to Reverse a linked list Ness-Technologies3
Given n nodes. Find the number of different structural binary trees that can be formed using the nodes. Aricent3
How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com Deshaw8
Give a one-line C expression to test whether a number is a power of 2. Microsoft7
How we will connect multiple client ? (without using fork,thread) TelDNA2
why java is platform independent? Wipro6
Write a program that find and print how many odd numbers in a binary tree  1
program to find the roots of a quadratic equation  1
how to return a multiple value from a function? Wipro1
Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list) Disney2
Finding a number multiplication of 8 with out using arithmetic operator NetApp7
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution) Microsoft4
to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD Synergy6
 
For more C Code Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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