Click here to Skip to main content
15,918,808 members
Home / Discussions / C#
   

C#

 
GeneralDrag/drop component Pin
Accius5-Dec-07 2:13
Accius5-Dec-07 2:13 
GeneralRe: Drag/drop component Pin
Skippums5-Dec-07 3:33
Skippums5-Dec-07 3:33 
Generalmake Whole Grid Editable Pin
Archana New to Dotnet5-Dec-07 2:08
Archana New to Dotnet5-Dec-07 2:08 
GeneralRe: make Whole Grid Editable Pin
Sathesh Sakthivel5-Dec-07 2:25
Sathesh Sakthivel5-Dec-07 2:25 
GeneralListBox events Pin
Deian5-Dec-07 0:35
Deian5-Dec-07 0:35 
GeneralRe: ListBox events Pin
Jacky Yiu5-Dec-07 0:45
Jacky Yiu5-Dec-07 0:45 
GeneralRe: ListBox events Pin
Deian5-Dec-07 1:04
Deian5-Dec-07 1:04 
GeneralRe: ListBox events Pin
Justin Perez5-Dec-07 2:19
Justin Perez5-Dec-07 2:19 
GeneralRe: ListBox events Pin
Deian5-Dec-07 2:36
Deian5-Dec-07 2:36 
GeneralRe: ListBox events Pin
Justin Perez5-Dec-07 2:50
Justin Perez5-Dec-07 2:50 
GeneralBinding Combo box with database Pin
sindhutiwari5-Dec-07 0:29
sindhutiwari5-Dec-07 0:29 
GeneralRe: Binding Combo box with database Pin
Jacky Yiu5-Dec-07 0:40
Jacky Yiu5-Dec-07 0:40 
GeneralSetting Labels text specific to the current system culture . Pin
PranavThakur5-Dec-07 0:08
PranavThakur5-Dec-07 0:08 
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 

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.