Search:

Type: Posts; User: Obvious Guy

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. 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...
  2. 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?
  3. 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...
  4. 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
  5. 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...
  6. what would you change about my approach?

    what would you change about my approach?
  7. 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?
  8. 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...
  9. 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
    ...
  10. 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>
  11. but I don't think hat would solve my stack...

    but I don't think hat would solve my stack smashing problem
  12. 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...
  13. 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...
  14. Replies
    1
    Views
    482

    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....
  15. 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
  16. #include #include ...

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

    int main() {

    char array[20];
    int length = 0;
    int i;
    int key = 256;
  17. 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.


    ...
  18. 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...
  19. I dont know thats what i am trying to solve

    I dont know thats what i am trying to solve
  20. 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...
  21. 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...
  22. in the loop? that won't help i believe

    in the loop?
    that won't help i believe
  23. 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...
  24. Replies
    28
    Views
    2,485

    hi I want to thank you all for your help I...

    hi
    I want to thank you all for your help
    I have finally solved the problem :)
    It was difficult though and yes I am a beginner :)
  25. Replies
    28
    Views
    2,485

    Is it really that easy as everyone assumes? I...

    Is it really that easy as everyone assumes?

    I have been stuck on this exercise since sunday , I have spent hours but I can't get to the solution



    #include <stdio.h>
    int main()
    {
    int c;
Results 1 to 25 of 42
Page 1 of 2 1 2