Oh yea lol I forgot about that (reserved word as a header guard name), thanks I got rid of the struct.h file errors. But I got a dozen new ones :D
Type: Posts; User: JohnnyC
Oh yea lol I forgot about that (reserved word as a header guard name), thanks I got rid of the struct.h file errors. But I got a dozen new ones :D
I'm using a makefile, but anyways this is my struct.h file
#ifndef struct
#define struct
typedef struct person{
char *name;
int socialNum;
char *dateOfBirth;
Ok I'm gonna inform myself a bit more about when NULL should be used.
Thanks to everyone for helping me :)
Sometimes I use a decimal 0 or a char [NULL]
Why does this print 1, I thought it should print 0 since there is nothing in it and strlen dosn't count the \0 at the end of the string.
#include <stdio.h>
#include <string.h>
int main ()...
Thank you guys. I mean this is my homework and I wont get a Note so in that way its not important.
But stuff like this should be in my exam, so thats why I really want to know how to do it. And my...
I have been working on this for a long time with no success,
so yea what am I doing wrong here.
I'm trying analyze every word of a string, that means vowels, numbers, signs, and constants.
...
Thank you :)
So I made this program, its purpose should be to for example I write a text and It needs to see how many words there are, how many vowels and so on...
#include <stdio.h>
#include <string.h>...
Thanks, so yea for sscanf() I found this "On success, the function returns the number of variables filled". So that explains the !=5.
As for fgets(), it reads a line from the specified stream...
Hello and thank you for taking your time to expalin me some things :)
So I didn't write this program, I found it online so I would like to know some things a bit more.
This is a program that...
Shortly after you told me that I managed to do it, I looked online how someone else did the average and saw he did something similar to what I tried but the only thing was I wrote float where I...
You mean generally in math? then yes. Sum divided by number of elements.
But idk how to make a sum of the characters that are str1[i]==str2[i].
Thanks for the reply :)
So this is what I need to do:
https://i.imgur.com/aqw0tzg.png
https://i.imgur.com/hok4ozL.png
Im stuck at the return the avrage value of the substrings that is a match. Idk how to make an...
Long lost father?
But yea it works :D Thanks a lot
int main()
{
signed int a;
signed int b;
Thats the result I'm getting when I put 20 and -33 using | instead of +.
If I use + I get 85899345887.
While I should be getting 90194313183
Did but I still dont get the correct result for 20 -33
18446744073709551583
44 in hex 0x2C
88 in hex 0x58
188978561112 in hex 0x2C00000058
So what I got from this is that I gotta move the first number 32 bits to the left so <<32 and then add the second number and yea...
So this is what the assignment says:
- I need to write two whole numbers using signed int
- I need to save these two numbers in a unsigned long long variable with the help of Bitshift
- Print...
yea its said that we need to use 2 loops but tbh im super new to programming so idk what i need to change there so i can make it with while do
edit: just got a friend to send me his result i get...
So basicly I have some homework to do, useing for and then while do I need to write this
1 x 1 = 1
2 x 1 = 2
3 x 1 = 3
...
9 x1 = 9