Click here to Skip to main content
15,902,939 members
Home / Discussions / C#
   

C#

 
GeneralRemove "Delete-Key" on dataGridView Pin
M Riaz Bashir5-Dec-07 0:08
M Riaz Bashir5-Dec-07 0:08 
GeneralRe: Remove "Delete-Key" on dataGridView Pin
dan!sh 5-Dec-07 0:12
professional dan!sh 5-Dec-07 0:12 
GeneralRe: Remove "Delete-Key" on dataGridView Pin
M Riaz Bashir5-Dec-07 0:14
M Riaz Bashir5-Dec-07 0:14 
QuestionVista file access Pin
brain2cpu4-Dec-07 23:39
professionalbrain2cpu4-Dec-07 23:39 
GeneralRe: Vista file access Pin
mav.northwind4-Dec-07 23:49
mav.northwind4-Dec-07 23:49 
GeneralRe: Vista file access Pin
Pete O'Hanlon5-Dec-07 3:16
mvePete O'Hanlon5-Dec-07 3:16 
GeneralRe: Vista file access Pin
David Knechtges5-Dec-07 4:07
David Knechtges5-Dec-07 4:07 
Questionfile operation problem Pin
leovava4-Dec-07 23:17
leovava4-Dec-07 23:17 
Confused | :confused: The following program reads from a text file containing numeric data stored in columns separated by one blank space. Write the code and compile it on your computer. Create a text file called myfile.txt containing a few columns (3?5 for example) of numeric data (real numbers) and test the program.
#include <stdio.h>
int main(void)
{
FILE *fp;
double val;
char ch;

fp = fopen("myfile.txt","r");
do{
fscanf( fp, "%lf", &val );
ch = getc(fp);
printf(" %lf",val);
if ( ch=='\n' || ch==EOF )
printf("\n");
} while ( ch != EOF );
fclose(fp);
return 0;
}
Modify the code so that the program additionally creates a new text file where it stores only the integer part (discard the factionary part) of the real numbers stored in myfile.txt. The new file should write data in the same format (3?5 with columns separated by space) as the original file. Include statements to check if the file was opened and closed successfully.

ad

GeneralRe: file operation problem Pin
CKnig5-Dec-07 0:47
CKnig5-Dec-07 0:47 
Generalupdate desktop project from web Pin
greekius4-Dec-07 22:36
greekius4-Dec-07 22:36 
GeneralRe: update desktop project from web Pin
Jacky Yiu4-Dec-07 23:47
Jacky Yiu4-Dec-07 23:47 
GeneralLoading treeview from database using BackGroundWorker class Pin
D i x y4-Dec-07 22:34
D i x y4-Dec-07 22:34 
GeneralRe: Loading treeview from database using BackGroundWorker class Pin
mav.northwind4-Dec-07 23:50
mav.northwind4-Dec-07 23:50 
GeneralRe: Loading treeview from database using BackGroundWorker class Pin
Jacky Yiu5-Dec-07 0:02
Jacky Yiu5-Dec-07 0:02 
QuestionContains dows not work properly...? Pin
Pankaj - Joshi4-Dec-07 22:16
Pankaj - Joshi4-Dec-07 22:16 
AnswerRe: Contains dows not work properly...? Pin
dan!sh 4-Dec-07 22:52
professional dan!sh 4-Dec-07 22:52 
GeneralNot working yet???? Pin
Pankaj - Joshi4-Dec-07 23:03
Pankaj - Joshi4-Dec-07 23:03 
GeneralRe: Contains dows not work properly...? Pin
mav.northwind4-Dec-07 23:22
mav.northwind4-Dec-07 23:22 
GeneralRe: Contains dows not work properly...? Pin
Pankaj - Joshi4-Dec-07 23:32
Pankaj - Joshi4-Dec-07 23:32 
GeneralRe: Contains dows not work properly...? Pin
dan!sh 4-Dec-07 23:32
professional dan!sh 4-Dec-07 23:32 
AnswerRe: Contains dows not work properly...? Pin
mav.northwind4-Dec-07 23:34
mav.northwind4-Dec-07 23:34 
GeneralRe: Contains dows not work properly...? Pin
Pankaj - Joshi4-Dec-07 23:50
Pankaj - Joshi4-Dec-07 23:50 
GeneralRe: Contains dows not work properly...? Pin
mav.northwind5-Dec-07 0:38
mav.northwind5-Dec-07 0:38 
GeneralRe: Contains dows not work properly...? Pin
Pankaj - Joshi5-Dec-07 0:49
Pankaj - Joshi5-Dec-07 0:49 
AnswerRe: Contains dows not work properly...? Pin
Luc Pattyn5-Dec-07 0:09
sitebuilderLuc Pattyn5-Dec-07 0:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.