GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Honey Well  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 3 of 5    Print  
can we add floating pointer to variable in C

  
Total Answers and Comments: 2 Last Update: November 24, 2007     Asked by: mainathan 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 21, 2006 11:40:33   #1  
vchandm23 Member Since: September 2006   Contribution: 4    

RE: can we add floating pointer to variable in C
no. i C language the pointer is capable of storing int value
 
Is this answer useful? Yes | No
November 23, 2007 08:40:00   #2  
embeddeddeveloper        

RE: can we add floating pointer to variable in C
YES OFCOURSE....

#include <stdio.h>
#include <conio.h>

int main()
{
int myVar;
float fVal 5.5;
float *pFloat;
pFloat &fVal;

myVar myVar + (int)pFloat;

printf(" d" myVar);

getch();
}

 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : YES OFCOURSE....#include #include int main(){     int myVar;     float fVal   = 5.5;     float *pFloat;     pFloat = &fVal;     ...
Read Answers (2) | Asked by : mainathan
Tags : Pointer

1.what is the difference b/w pointer and pointer++2.what is difference b/w pointer &array3.what is the difference b/w class& structure 
Latest Answer : 3. structures and classes both are used in c++ but classes are private by default and structures are public by default. structures are also used in c but not classes. ...
Read Answers (2) | Asked by : ASHISH-KUMAR MISHRA


 Sponsored Links

 
Related Articles

C++ Void Pointer and Null Pointer

C Void Pointer and Null Pointer In this C tutorial you will learn about two interesting types of pointers; void pointers and Null Pointer These pointers will be discussed in conjunction with syntax usage and example mosgoogle center Pointer to Void General Syntax void pointer variable; Void is use
 

What happens when a variable is not initialized in main function?

When a variable is not initialized in main function it contains garbage value. This can be well seen from the example below main() { int x; printf(&ldquo;%d&rdquo;,x); z= sample() } sample() { printf(&ldquo;Testing program&rdquo;); } Output is &nbsp;&nbsp;&n
 

What happens when a variable is not declared in function definition?

Generally in C program the function definition and calling takes the form as given below: main() { int x,y,z; z=sample(x,y); printf(&ldquo;%d&rdquo;,z); } sample(x1,y1) int x1,y1; { int z1; z1= x1 - y1; return(z1); } Here what happens is the values x, y gets passed to x1,y1
 

Variable, Constants and Data types in C++

Variable Constants and Data types in C In this C tutorial you will learn about variable constants and data types in C rules for defining variable name short int int long int float double long double char bool declaring variables and constants mosgoogle Variables A variable is the storage location in
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape