Monday 17 June 2013

;)


#include <stdio.h>
#include <string.h>
#define SIZE 30

int main()
{
  char name[ SIZE ]; 
  FILE *fpPtr; 

  if ( ( fpPtr = fopen( "sorted_file.txt", "r" ) ) == NULL ) {
    printf( "File could not be opened\n" );
  } 
  else {
    printf( "%s\n", "Name" );
    fscanf( fpPtr, "%s", name );

    while( !feof( fpPtr ) ) {
       printf( "%s\n", name );
       fscanf( fpPtr, "%s", name );
    } 

    fclose( fpPtr ); 
  } 

 return 0; 
};

2 comments:

  1. What i do not realize is in fact how you
    are now not really a lot more smartly-liked than you may be now.
    You are very intelligent. You understand thus considerably in terms of this subject, produced me individually believe it from a lot of various angles.
    Its like women and men don't seem to be involved until it is one thing to do with Girl gaga! Your personal stuffs excellent. At all times maintain it up!

    Also visit my weblog - payday loans

    ReplyDelete
  2. Hi, I need help in the following program:

    Write a Program to arrange given set of 2-D points in clockwise order.

    For example:
    1.
    Input: {{5,5}{0,5}{0,0}{5,0}}
    Output: {{0,0}{5,0}{5,5}{0,5}}

    2.
    Input: {{2, -2}{0, -5}{-5, 0}{2, 0}{0, 5}}
    Ouput: {{0, -5}{2, -2}{2, 0}{0, 5}{-5, 0}}

    points are represented in (x,y) 2-D cartesian coordinate system where x is projected as horizontal axis and y as vertical axis.

    Can you help?

    ReplyDelete