fseek Example in Clanguage



Share on Google+Share on Google+

fseek Example in Clanguage
1 Answer(s)      7 years ago
Posted in : Development process
View Answers

December 2, 2009 at 12:15 PM

Hi Friend,

fseek()function seeks a specified place within a file, opened by fopen().In the given code this function replace the string 'World' with 'India' that is written in the file.

Try it:

#include <stdio.h>

int main ()
FILE * f;
f = fopen ( "myfile.txt" , "w" );
fputs ( "Hello World" , f );
fseek ( f , 6 , SEEK_SET );
fputs ( " India" , f );
fclose ( f );
return 0;



Related Tutorials/Questions & Answers:
fseek Example in Clanguage - Development process
fseek Example in Clanguage  I want fseek() Example in C .Plz Give me  Hi Friend, fseek()function seeks a specified place within a file... ); fseek ( f , 6 , SEEK_SET ); fputs ( " India" , f ); fclose ( f ); return 0
fseek() example
fseek () The fseek() function searches pointer in an open file and used... on the file will also be appended.  Syntax fseek(file,offset,whence) ... to a position before EOF, the offset must be a negative value) Example: <?php
PHP fseek() function and example
Syntax int fseek (file_handle ,offset [, whence ] ) It seeks the new... with offset), SEEK_END (Makes position to EOF with offset ) Example of PHP fseek() Function PHP Code code for fseek() Function in PHP <?php
C file fseek() function
C file fseek() function This section demonstrates the use of fseek() function... it. Its syntax is:  fseek(FILE *stream, long int offset, int whence... with an example. In the following code, the function fopen(file, "w"
example  example on Struts framework
example  example on Struts framework
example  i need ex on struts-hibernate-spring intergration example   Struts Spring Hibernate Integration
PHP function ftell() with example
Syntax int ftell(file_handle) ftell() function gives the current position of the file pointer. using the file handler in bytes. Example of PHP...($file); fseek($file,40); echo "<br>".ftell($file); ?> Output 0
nsentitydescription example
nsentitydescription example  nsentitydescription example
Ajax example
Ajax example   Hi, Where can I find Ajax example program? Thanks   Hi, Get it at: Ajax Tutorials First Ajax Example Ajax Login Example Thanks
viewwillappear example
viewwillappear example  i need an example of viewwillappear
example code
example code  code for displaying a list from another class on a midlet
array example
array example  giving input from outside for array example
UIButtonTypeCustom Example
UIButtonTypeCustom Example  Hi, Can anyone provide me example of creating UIButton with UIButtonTypeCustom style? Thanks   Hi, Use following example code: UIButton *button = [UIButton buttonWithType
NSUserDefaults Example
NSUserDefaults Example  Hi, How to use NSUserDefaults? Can anyone share me the NSUserDefaults example code? Thanks   Hi, Please check the thread NSUserDefaults Example. Thanks
viewwillappear example
viewwillappear example  Hi, Can anyone share me the example of viewwillappear example in IOS? Thanks   HI, Following code can be used: - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated
ibatis example
ibatis example  Which lib directory should we put the ibatis jar files as given in the example of ibatis
Interceptors Example
Interceptors Example  Could anyone give an example of an interceptor through its usage
structure example
structure example  in the example above what do you call the names student1,student2 and student3   Post the code
uisearchbar example
uisearchbar example  UISearch Bar Example - How to enable UISearch bar on map view application
Vitamio example
Vitamio example  Please Give me Whole Code with Manifest file for vitamio example in Android...for Playing Video in Videoview
Hibernate Example
This tutorial illustrate an example of hibernate
ajax example
Ajax Example Here is the list of few Ajax examples at RoseIndia.net. Ajax example Ajax example   Hi, Where can I find Ajax example... Example Ajax Login Example Thanks Ajax Tutorials  Collection of top
heightForRowAtIndexPath example
heightForRowAtIndexPath example  Hi, Give me code for heightForRowAtIndexPath example? Thanks   Hi, Please check the thread UITableView heightForRowAtIndexPath. Thanks
DAO Example
DAO Example  Dear Friends Could any one please give me any example of DAO application in struts? Thanks & Regards Rajesh
nofollow example
nofollow example  Hi, Provide me nofollow example code. Thanks   Hi, Please check the thread: How to add nofollow in website link? Thanks
MVC Example
MVC Example  I WANT MVC EXAMPLE PROGRAM using Jsp Servlets and Jdbc with mysql of Insert,update,delete,search. please give the answer in MVC rule
NSNotificationCenter Example
NSNotificationCenter Example  Hi, can anyone help me to understand NSNotificationCenter better ..? If possible then please provide me an example or tutorial of nsnotificationcenter in objective c. Thanks
standardserviceregistrybuilder example
class. But there is no code of standardserviceregistrybuilder example. Do you know... the complete code at Hibernate 4 Hello World: Example of Hello World program. Thanks
fgets() example
; Example: <?php $file = fopen("upload.php", "r"...($file). "<br />"; } fclose($file); ?> In this example


Advertisement null