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
I have a function which accepts a pointer to an int.  How
can I pass a constant like 5 to it?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?
Answer
# 1
You will have to declare a temporary variable.
 
Is This Answer Correct ?    0 Yes 0 No
Guest
 
  Re: I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?
Answer
# 2
u have to take a temporary variable and pass its adress to 
the pointer...like that given below:

// assuming all the conditions are given


int temp=5;
function(&temp);
 
Is This Answer Correct ?    0 Yes 0 No
Om Prakash Mishra
 
 
 
  Re: I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?
Answer
# 3
Only Using type modifiers only constant 5 is sent to 
function.

[In previous 2 answers address of variable temp (5) is only 
send to fn , not a constant 5]

for that fn-call is

function((int*)5);
 
Is This Answer Correct ?    0 Yes 1 No
Jaya Prakash
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
To find whether a number is even or odd without using any conditional operator?? IBM4
Concat two string with most overlapped substring has to remove  "abcd"+ "cdef" = "abcdef  5
code snippet for creating a pyramids triangle ex 1 2 2 3 3 3  3
what is the first address that gets stored in stack according to a C or C++ compiler???? or what will be the first address that gets stored when we write a C source code???????? Apple2
what is the code for getting the output as * ** *** Caritor5
write a programme that inputs a number by user and gives its multiplication table.  2
number 2 plssssss help !!....using array.. turbo c.. create a program that will accept a number and determine if it is a happy number or an unhappy number.. example: enter a number : 7 7*7=49 then 4 and 9 4*4 and 9*9== 16 + 18 gives you 97 then 9 and 7 9*9 and 7*7 == 81 + 49 gives you 130 then 1 and 3 1*1 and 3*3 == 1 + 9 gives you 10 1*1 gives you 1 sample output: 7= 49= 16+81= 97= 81+49=130 =1+9=10 =1 "7 is a happy number" . if the last number is 2 then the number being inputed is not a happy number.  2
There is a 100-story building and you are given two eggs. The eggs (and the building) have an interesting property that if you throw the egg from a floor number less than X, it will not break. And it will always brake if the floor number is equal or greater than X. Assuming that you can reuse the eggs which didn't broke; you got to find X in a minimal number of throws. Give an algorithm to find X in minimal number of throws.  2
wap in c to accept a number display the total count of digit  4
how to find out the inorder successor of a node in a tree?? TCS2
what is pointer ? Kernex-Micro-Systems7
Difference between Class and Struct. Motorola6
size maximum allocated by calloc() DELL1
how to sort two array of characters and make a new array of characters. Accenture1
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; } NDS3
Is the C language is the portable language...If yes...Then Why...and if not then what is problem so it is not a Portable language..??? TCS1
What is the output of the program given below #include<stdio.h> main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); } ADITI14
define function Assurgent4
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
What is an volatile variable? HP12
 
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