6356672 was the address of array1. If you want the actual number you have to use the subscript operator, like array1[0], array1[1]...
I would recommend that you get a (e)book. Just guessing how...
Type: Posts; User: thmm
6356672 was the address of array1. If you want the actual number you have to use the subscript operator, like array1[0], array1[1]...
I would recommend that you get a (e)book. Just guessing how...
You need a format specifier in your printf.
printf("1+2= %d", int3);
You need to copy the values from arr1 to arr2 only if they are greater than threshold. There is no need to find the min.
Maybe sth. like this:
for (int i = 0; i < length; ++i) {
if...
You are right. Thanks for pointing it out.
Wouldn't it be possible to set the locale to a country that uses the comma as decimal separator and read the input as a flaot ?
When I ran the code in VS 2019 I got an exception at line 85
strcpy(A[index].name, temp.name);
when index was -307.
Have a look at this tutorial. It uses an int for the data but you could modify to use strings.
Given a linked list which is sorted, how will you insert in sorted way - GeeksforGeeks
Why not follow the KISS priciple?
#define NAME_LEN 100
char first_name[NAME_LEN];
scanf("%99s", first_name);
Consider sth. like this:
bool import(bool provided)
{
char file_name[256] = { 0 };
FILE* src = NULL;
if (provided)
Not sure if you have learned about functions yet, but they would make your task easier:
#include <stdio.h>
#include <stdbool.h>
void print_prime_factors(int num)
{
printf("The prime...
Still no luck with MinGW:
Alu_demo\alu\_.h|4|fatal error: unic/limits.h: No such file or directory|
It has nothing to do with MS. Neither MinGW nor cygwin have these
Is it really necessary to use non-standard headers like uchar.h and non-standard types like ssize_t ?
5. People might had an interest but couldn't build it Windows(possible)
If you want to do some automated testing - and at some point you need to learn it - you follow this pattern:
1. define your input
2. define the expected output
3. get the actual output
4. check...
Wheb hamster_nz spoke about heaps he porbbly meant the data structure, not the place where malloc allocates the memory.
Heap Data Structure - GeeksforGeeks
I am not sure if a text file is the...
Maybe like this:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int roll()
{
int dice;
printf("%.2f", double i, rel(double i));
When passing an argument to a function you don't pass the type, only the name. Also when you pass 2 parameters to printf you need 2 format specifiers.
...
Let me try to explain in simple words:
1. open a stream for reading
2. open a stream for output
while reading a line from input
if line doesn't start with <settings> then
...
I would suggest that you start learning the syntax of the C language first.
There are plenty of free tutorials online. Alternatively you could get a book.
A few were recommended to you in a...
What browser do you use?
This site doesn't work properly on Firefox.
You need to use a for loop to print your stars.
for loop in C - Tutorialspoint
internal, item and cash are not valid C keywords.
In scanf you shouldn't have a space between % and d
You need to implement the functionality of the menu items.
Seems not many people interested here. Why don't you try your luck in another forum:
UNIX/Linux Programming - C++ Forum
or
C and C++ Forum | Dream.In.Code
BTW. Your code calls many functions,...
In an array all values must have the same type.
You could create an array of uint32_t and store uint32_t in it.