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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   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
main()
{
  printf(5+"Vidyarthi Computers");
}
 Question Submitted By :: Vijay
I also faced this Question!!     Rank Answer Posted By  
 
  Re: main() { printf(5+"Vidyarthi Computers"); }
Answer
# 1
ouptput:-
    vidya
 
Is This Answer Correct ?    0 Yes 0 No
Vijay
 
  Re: main() { printf(5+"Vidyarthi Computers"); }
Answer
# 2
I would rather say 

rthi Computers

Reason is printf() takes a pointer to char to print the 
string. we said 5+"Vidyarthi Computers" so this is 
interpreted as "rthi Computers" becuase we have added 5 to 
the base pointer. so it will print only "rthi Computers".
 
Is This Answer Correct ?    0 Yes 0 No
Sujith
 
 
 
  Re: main() { printf(5+"Vidyarthi Computers"); }
Answer
# 3
output is


rati Computers
 
Is This Answer Correct ?    0 Yes 0 No
Rani
 
  Re: main() { printf(5+"Vidyarthi Computers"); }
Answer
# 4
rthi computers
 
Is This Answer Correct ?    0 Yes 0 No
Devvv
 
  Re: main() { printf(5+"Vidyarthi Computers"); }
Answer
# 5
arthi computers..


i think 5 characters is 0 - 5 and not 1- 5...
 
Is This Answer Correct ?    0 Yes 0 No
Shruti
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above Accenture3
What is the Difference between Macro and ordinary definition? Motorola2
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?  3
wats SIZE_T meant for?  1
what is a headerfile?and what will be a program without it explain nan example? Assurgent3
to find the program of matrix multiplication using arrays  2
main() { char *p; p="Hello"; printf("%c\n",*&*p); } ME2
code snippet for creating a pyramids triangle ex 1 2 2 3 3 3  2
Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0 Qualcomm2
Given an array of numbers, except for one number all the others occur twice. Give an algorithm to find that number which occurs only once in the array.  1
what is compiler  5
What is the main differences between C and Embedded C?  1
How can I implement opaque (abstract) data types in C? What's the difference between these two declarations? struct x1 { ... }; typedef struct { ... } x2;  2
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  1
program to find middle element of linklist? Huawei1
parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..  3
what is the maximum no. of bytes calloc can allocate Mphasis2
two variables are added answer is stored on not for third variable how it is possible?  2
What is the memory allocated by the following definition ? int (*x)[10]; ADITI3
15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?  1
 
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