Search:

Type: Posts; User: Obvious Guy

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Hello, Thank yo for your answer. I don't really...

    Hello, Thank yo for your answer.
    I don't really understand the sorting algorithm
    Why do we return true and why do we return false?
  2. Writing an algorithm that doesn't use to many if clauses

    I am pretty new to c++ and I am trying to implement an efficient sorting algorithm. I want this to also work for four players but at the moment I am testing my program for 2 players. Each player has...
  3. printing out bit values without using an array

    I wrote a code that requests user input and then converts binary to bcd then back to binary using bitwise operations.
    While I think my code is good I want to know if there is a better way to write...
  4. hello Thank you for the answer I have one...

    hello
    Thank you for the answer

    I have one question
    How can I modify this code that it will count it as an error if the same wrong letter is inputed more than once?
  5. Thank you for your answer. And I realized that I...

    Thank you for your answer. And I realized that I would probably have to start from scratch.
    But the problem I haven't been able to solve is the output.
    For example if the word that is Entered looks...
  6. I am almost done with the code , it's just that I...

    I am almost done with the code , it's just that I can't figure it out. I have been trying for hours and I would be really happy if someone could help me
  7. Getting HangMan to accept lowercase letters and print them in uppercase

    I wrote a very simple Hangman game that requests user input then makes the user guess up to six times.

    The first letter of the word is always shown and if the user inputs the same letter that has...
  8. what would you change about my approach?

    what would you change about my approach?
  9. buffer[i] should have the first string in the...

    buffer[i] should have the first string in the file if i = 0
    or is it pointing to the first character instead of the first string?
  10. Thanks for the reply. I don't quite understand...

    Thanks for the reply.
    I don't quite understand what you mean when you said I should be calling strcspn separately
    Where should I call it?

    I changed the strspn to


    if...
  11. reading a txt file line by line and checking for an invalid character

    I wrote a code that reads a txt file line by line and checks if each line has the invalid character ' ' in it.



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #define NCHAR 64
    ...
  12. I am almost there I wrote a function. But now...

    I am almost there
    I wrote a function.
    But now it does removes the space from the first array element.





    #include <stdio.h>
    #include <string.h>
  13. but I don't think hat would solve my stack...

    but I don't think hat would solve my stack smashing problem
  14. removing spaces from a string in an array of strings

    I am working on a project that reads input from a file ,stores them into an array and remove the spaces in each string array.
    I am doing this so that I can check if the string that were read in the...
  15. separting integer from string and storing it in a linked list.

    I wrote a code that takes input from a file and stores them into a linked list.
    My code stores the contents of the file into a node contains a char array.
    So if I did everything right each name in...
  16. Replies
    1
    Views
    3,507

    structs and linked lists

    For an assignment I have to create a linked list.
    I have to read from an input file and save the contents to a linked list.
    But before that I want to ask for advice which approach would be wiser....
  17. yeah that's what I am trying to do. shifting as...

    yeah that's what I am trying to do. shifting as in caesar cipher
  18. #include #include ...

    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>

    int main() {

    char array[20];
    int length = 0;
    int i;
    int key = 256;
  19. reducing string length if a space is read

    while using fgets to get the input from the user I am trying to reduce the string length of the array by one when a space is read.

    this is a small portion of the code.


    ...
  20. segmentation fault when assigning a value to a 2d array

    I wrote this code that asks the user to input the number of triangles and triplets.

    however when i print out the array elements I get a seg fault.

    During the first iteration that the user is...
  21. I dont know thats what i am trying to solve

    I dont know thats what i am trying to solve
  22. for example if the input is 0, 1,2 or 3 the...

    for example if the input is 0, 1,2 or 3
    the output should be "zero", "one" "t
    wo" or "three".
    for all other numbers the output should remain the same. so if the input is 22 the ouput should be...
  23. no I tried it I added a putchar('\n') in the...

    no I tried it
    I added a putchar('\n') in the while loop and in the for loops
    I still didn't get the result I wanted.
    for example it converts 11 to oneone. It should only work for int from zero...
  24. in the loop? that won't help i believe

    in the loop?
    that won't help i believe
  25. program dosen't work for double digit input

    I wrote code that replaces integers from 0 to 3 with strings. I was only allowed to use getchar() and putchar(). If the input is 1, the output will become "one".

    And I am only allowed to use...
Results 1 to 25 of 44
Page 1 of 2 1 2