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...
Type: Posts; User: YannB
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...
the output of the code is 5360 how do i get to that?
okay true that i get again the problem is getting the output of the code in hand?
That i completely understand without a doubt.
my problem is calculating the code i showed all of you by hand
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?
Not quite, i'm looking to know how to manually get the output without coding it
Well given x when we code it so
int main()
{
int x = 1340;
printf("%d\n", x<<2);
}
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...
got it!
#include <stdio.h>
int main()
{
int arr[10];
int *ptr;
int i;
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>
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:....
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...
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?
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?
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.
...
amazing thank you i understand it now
so if let's say num=5 it means that i start at num=3?
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...
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);...
thanks for the help
okay well since now y=3 and we have ++y which is initialized before it's use y=4 therefor answer is 8
ohh okay so if i understand
x=2*(y++)= 2*2
y=3;
is that the case?
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
from what i see:
x=2;
x= 2*3=6; because y++=3;
hey everyone,
Can anyone explain to me why x=4 in the following code?
#include <stdio.h>
int main()
{