Search:

Type: Posts; User: YannB

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    14
    Views
    2,206

    thanks that's exactly what i needed. I have a...

    thanks that's exactly what i needed. I have a question though,
    why did you add 2 zeros (i know that it doesnt change the value) but there has to be a reason why? and do i need to do this for any...
  2. Replies
    14
    Views
    2,206

    the output of the code is 5360 how do i get to...

    the output of the code is 5360 how do i get to that?
  3. Replies
    14
    Views
    2,206

    okay true that i get again the problem is getting...

    okay true that i get again the problem is getting the output of the code in hand?
  4. Replies
    14
    Views
    2,206

    That i completely understand without a doubt. my...

    That i completely understand without a doubt.
    my problem is calculating the code i showed all of you by hand
  5. Replies
    14
    Views
    2,206

    don't worry about it appreciate your help. i...

    don't worry about it appreciate your help.
    i know that it's a bitwise operation which means that it should be shifting left side right?
  6. Replies
    14
    Views
    2,206

    Not quite, i'm looking to know how to manually...

    Not quite, i'm looking to know how to manually get the output without coding it
  7. Replies
    14
    Views
    2,206

    Well given x when we code it so int main()...

    Well given x when we code it so


    int main()
    {
    int x = 1340;
    printf("%d\n", x<<2);
    }
  8. Replies
    14
    Views
    2,206

    Bitwise Operator Shift

    Hey everyone,

    I'm having a problem understanding bitwise operators.
    I have an exercise where x is given (x=1340) and i need to calculate x<<2 which is 5360

    first of all i know how to convert...
  9. Replies
    1
    Views
    670

    got it! #include int main() { ...

    got it!

    #include <stdio.h>

    int main()
    {
    int arr[10];
    int *ptr;
    int i;
  10. Replies
    1
    Views
    670

    Issue with Pointer

    hey everyone!

    having a small problem with my pointer.
    I'm just trying to scan an array using a pointer but when i print it it shows me only zeros. Any help?



    #include <stdio.h>
  11. Replies
    1
    Views
    660

    Understanding String Functions

    Hey everyone,

    I'm trying to practice strings and I need you're help.
    I tried to build a code by myself where i'm sorting my strings in lexicographic order but i had to peak at the solution :mad:....
  12. Replies
    2
    Views
    1,145

    Understanding Strings - Statements

    Hey all,

    I am having an issue here but i really don't understand what's happening. the code below asks the user to input a string and what letter does the user want to change and with what.

    The...
  13. Replies
    7
    Views
    952

    i fixed it! but i still don't understand. from...

    i fixed it!
    but i still don't understand.
    from what i understood i need to declare
    long count = 0;
    why do i need to declare long though?
  14. Replies
    7
    Views
    952

    Thank you but when i do that i'm having: implicit...

    Thank you but when i do that i'm having: implicit conversion loses integer precision: 'unsigned long' to 'int'

    could you explain how can i avoid having that?
  15. Replies
    7
    Views
    952

    Understanding Strings

    Hy everyone,

    I would like to understand a function on strings --> strlen
    Below is a code that I took from my teacher where the user inputs a string and prints out the length of the string.


    ...
  16. Replies
    4
    Views
    1,282

    amazing thank you i understand it now

    amazing thank you i understand it now
  17. Replies
    4
    Views
    1,282

    so if let's say num=5 it means that i start at...

    so if let's say num=5 it means that i start at num=3?
  18. Replies
    4
    Views
    1,282

    Reversing an array

    hey everyone,

    I'm trying to understand a calculation here why a certain function has to be the way it is.

    Below is a code where the user enters a number for n times and then reverses it and on...
  19. Replies
    1
    Views
    1,508

    Understanding an exercise

    hi all,

    I have this code below and i'm trying to understand it.
    It's a code i took from an exercise and i need to analyze it.
    Can someone guide me on understanding it?


    void fun(int);...
  20. Replies
    11
    Views
    1,133

    thanks for the help

    thanks for the help
  21. Replies
    11
    Views
    1,133

    okay well since now y=3 and we have ++y which is...

    okay well since now y=3 and we have ++y which is initialized before it's use y=4 therefor answer is 8
  22. Replies
    11
    Views
    1,133

    ohh okay so if i understand x=2*(y++)= 2*2...

    ohh okay so if i understand

    x=2*(y++)= 2*2
    y=3;

    is that the case?
  23. Replies
    11
    Views
    1,133

    okay so why is the result 4 when it should be 8...

    okay so why is the result 4 when it should be 8 then.
    since ++y is already 3 before it's used then y++ so y=4
    2*4=8
    correct me if i'm wrong please
  24. Replies
    11
    Views
    1,133

    from what i see: x=2; x= 2*3=6; because y++=3;

    from what i see:
    x=2;
    x= 2*3=6; because y++=3;
  25. Replies
    11
    Views
    1,133

    Explanation on a simple program

    hey everyone,
    Can anyone explain to me why x=4 in the following code?



    #include <stdio.h>


    int main()
    {
Results 1 to 25 of 108
Page 1 of 5 1 2 3 4