Polfire's Posts
Nairaland Forum › Polfire's Profile › Polfire's Posts
1 (of 1 pages)
4 Sure marcar , , That wil be nice . |
I live in kewara , Bentley . |
greetings all , where re you guys in perth ? I reside for south of Perth ! |
marcar:funny ! really ? marcar , which area are you living ![]() |
Marcar , I am currently in Sydney right now , but will be moving to Bentley ,Perth in January/February . Will be starting a programme at Curtin. Any idea if Nigerians are in Curtin ![]() |
Greetings all! where are you guys in Perth ![]() |
I plan opening the file , fseeking it to get the size of the file and use the size to create an array that will contain the file characters char file_info[size] then I check for Sir or sirs using file-info[i]=='S' && file_info[i+1]=='I' && file_info[i+2]=='R' if that is true I will start returning file_info[i+4] till I reach a space . |
This is the problem , program that solve this , $ cat test1.txt I have just seen Sirs Sanjay and Eleonore! "I am a Knave," whispered Sir Eleonore. Who is a Knight and who is a Knave? $ solve $(cat test1.txt) The Sirs are: Eleonore Sanjay There is no solution. $ cat test2.txt I have just met Sirs Frank, Paul and Nina. Sir Nina said: "I am a Knight," but I am not sure if that is true. What do you think? $ solve $(cat test2.txt) The Sirs are: Frank Nina Paul There are 8 solutions. $ cat test3.txt Yesterday, I visited Sirs Andrew and Nancy. I asked Sir Andrew who he was, and he answered impatiently: "Sir Nancy and I are Knaves!" Then I met Sir Bill who introduced me to his wife and told me: "at least one of Sir Hilary and I is a Knave." Should I trust them? $ solve $(cat test3.txt) The Sirs are: Andrew Bill Hilary Nancy There is a unique solution: Sir Andrew is a Knave. Sir Bill is a Knight. Sir Hilary is a Knave. Sir Nancy is a Knight. |
Thanks ekt_bear , let me work on this , I understand what you said , I will get back here if i am confuse in any way.Thanks |
Hi all, I am trying to find and read the occurrence of names after a string in a file example : "Mr James is here , Mr Paul , john and Andrew are on their way. Mr buss is also coming ." From the above sentence , i want to out the names after "Mr" i need help on how to do this. I will appreciate any help ,thx. #include <stdio.h> #include <stdlib.h> int main(int argc , char **argv[]) { FILE *input_file = fopen( argv[1], "r" ); /* open file */ , |
1 (of 1 pages)
