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
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 ?    1 Yes 3 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 ?    4 Yes 0 No
Sujith
 
 
 
  Re: main() { printf(5+"Vidyarthi Computers"); }
Answer
# 3
output is


rati Computers
 
Is This Answer Correct ?    1 Yes 1 No
Rani
 
  Re: main() { printf(5+"Vidyarthi Computers"); }
Answer
# 4
rthi computers
 
Is This Answer Correct ?    2 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 ?    1 Yes 0 No
Shruti
 
  Re: main() { printf(5+"Vidyarthi Computers"); }
Answer
# 6
rthi computers

since this will be taken as a string and 5 is the subscript value and prints the remaining characters from 'r'.
 
Is This Answer Correct ?    1 Yes 0 No
Vignesh1988i
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Here is alphabets : abcdefgh 1) how to reverse. as hgfedcba 2) after reversal, how to group them in a pair hg fe dc ba.  2
let's take a code struct FAQ { int a; char b; float c; double d; int a[10]; }*temp; now explain me how the memory will be allocated for the structure FAQ and what address will be in the structure pointer (temp)....................  7
What is false about the following A compound statement is a.A set of simple statments b.Demarcated on either side by curly brackets c.Can be used in place of simple statement d.A C function is not a compound statement. TCS1
9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?  1
write a recursive program in'c'to find whether a given five digit number is a palindrome or not  1
what is the other ways to find a logic to print whether a number is an even or odd wit out using % symbol??????? i know three different ways to print it. so i need any other different logic>>>>> TCS3
1,1,5,17,61,217,?,?.  3
differentiate between const char *a; char *const a; and char const *a; HCL1
how many keywords do C compile? Microsoft2
How to add two numbers with using function?  3
HOW TO ANSWER IF ASKED " WHAT KIND OF A PERSON ARE YOU?" I NEED AN ANSWER THAT IMPRESS THE INTERVIEWER  2
difference between memcpy and strcpy  1
struct ptr { int a; char b; int *p; }abc; what is d sizeof structure without using "sizeof" operator?? Verifone8
Implement a function that returns the 5th element from the end in a singly linked list of integers in one pass. Microsoft6
which one is not preprocessor directive a)#if b)#elif c)#undef d)#pragma Wipro13
two progs are given. one starts counting frm 0 to MAX and the other stars frm MAX to 0. which one executes fast. Verifone5
Write a program to accept a character & display its corrosponding ASCII value & vice versa?  4
swap two integer variables without using a third temporary variable?  2
How can I allocate arrays or structures bigger than 64K?  4
Design a program using an array that searches a number if it is found on the list of the given input numbers and locate its exact location in the list.  3
 
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