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
44.what is the difference between strcpy() and memcpy()
function?
45.what is output of the following statetment?
46.Printf(“%x”, -1<<4); ?
47.will the program compile?
       int i;
       scanf(“%d”,i);
       printf(“%d”,i);
48.write a string copy function routine?
49.swap two integer variables without using a third
temporary variable?
50.how do you redirect stdout value from a program to a file?
51.write a program that finds the factorial of a number
using recursion?
 Question Submitted By :: Avula_sujatha@yahoo.co.in
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?
Answer
# 1
44. strcpy copy the string while memcpy copy the memory
contains of locations.

46.fffffff0
 
49. int a = 5;
    int b = 10;
    a = a+b;
    b = a-b;
    a = a-b;
 
Is This Answer Correct ?    1 Yes 0 No
Sachin Patil
 
  Re: 44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?
Answer
# 2
51.factorial of a number using recursion

 long factorial(long n){
  return (n==0 || n==1)?1:n*n-1;
 }
 
Is This Answer Correct ?    0 Yes 0 No
Jessu Srikanth
 
 
 
  Re: 44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?
Answer
# 3
sorry... I made a mistake in the previous 51.answer 
i am very sorry...

the solution for recursion is...

long factorial(long n){
  return (n==0 || n==1)?1:n * factorial(n-1);
 }
 
Is This Answer Correct ?    3 Yes 0 No
Jessu Srikanth
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
how to make program without <> in library. ADITI1
How would you print out the data in a binary tree, level by level, starting at the top? Microsoft4
what is array? HCL22
what is pointer ? Kernex-Micro-Systems7
If we give two names then this displays the connection between the two people. It is nothing but flames game  1
pgm in c to reverse string by word using array(god is love becomes love is god) (no additional array can used,space is only delimiter between words ) Persistent1
Write a program that takes three variables(a,b,c) in as separate parameters and rotates the values stored so that value a goes to b,b,to c and c to a  3
main() { float a=8.8; double b=8.8; if(a==b) printf("Equal"); else printf("not equal"); getch(); } what is the output? with reason  3
Give the output for the following program. #define STYLE1 char main() { typedef char STYLE2; STYLE1 x; STYLE2 y; clrscr(); x=255; y=255; printf("%d %d\n",x,y); } ADITI1
program to get the remainder and quotant of given two numbers with out using % and / operators? IBM8
A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above Accenture2
what is the difference between structural,object based,object orientd programming languages? PanTerra1
consider the following program sigment int n,sum=1; switch(n) { case 2:sum=sum+2; case 3:sum*=2; break; default:sum=0;} if n=2, what is the value of sum a.0 b.6 c.3 d.none TCS4
main() { printf(5+"good morning"); printf("%c","abcdefgh"[4]); }the o/p is morning and e...how someone explain  1
Reverse a string word by word??  6
what is const volatile?  1
what type of language is C? Microsoft2
How do I declare a pointer to an array?  5
how to find turn around time in operating system?  1
how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); TCS7
 
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