LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-13-2011, 12:17 AM   #1
ankitm
Member
 
Registered: Sep 2011
Posts: 33

Rep: Reputation: Disabled
Query regarding FILE *


Hi

When we give the follwing statement in C++

FILE *fp;

In this case does fp is initialized to NULL automatically or not ?

Thanks
 
Old 12-13-2011, 02:04 AM   #2
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by ankitm View Post
FILE *fp;

In this case does fp is initialized to NULL automatically or not ?
That depends on whether the initialization occurs inside an object and, if so, how the object is constructed.

In general, it won't be - so assume it isn't.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sqlplus query results with spool file go to display and file steven.c.banks Linux - General 2 06-06-2011 03:13 PM
Query on dbf file. just.srad General 1 07-06-2010 11:54 PM
query with file permissions iinfi Linux - Newbie 5 01-01-2009 04:11 AM
File Renaming Query johnpaulodonnell Linux - Newbie 5 11-07-2006 10:08 AM
/etc/group File Query Obie Linux - General 1 07-21-2004 12:02 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration