# Search:

Type: Posts; User: rusyoldguy

Page 1 of 3 1

1. ## Thread: Permutations Problem Help

by rusyoldguy
Replies
10
Views
1,679

### Hallo john.c With the string "ababa" according...

Hallo john.c

With the string "ababa" according the formula of Leonhard Euler
you would got 10 possible permutations.
The string have a length from 5 characters.

I think for the first time...
2. ## Thread: Struct + File

by rusyoldguy
Replies
5
Views
1,069

### Hi Syazzz here an example to write ONE set of...

Hi Syazzz

here an example to write ONE set of details:

typedef struct details
{
char plateNo[50];
3. ## Thread: Struct + File

by rusyoldguy
Replies
5
Views
1,069

### Hallo, Salem is right, you can use ...

Hallo,

Salem is right, you can use

scanf("%49[^\n]", b.plateNo);

This line reads all character including the space(ASCII 32dec)
The number 49 limits the length of the input to 49...
4. ## Thread: Permutations Problem Help

by rusyoldguy
Replies
10
Views
1,679

### calculate permutations

Hallo Salem!

To calculate the number of Permutations with 2 elements in a class is with the Forumula of Euler:

n = { (a+b)! /(a! *b!)}

If a string is "aabaa" you have
element_1 = a = 4...
5. ## Thread: to convert two-dimensional array to one-dimensional

by rusyoldguy
Replies
10
Views
1,182

### One more thing: If you want to turn axis like...

One more thing:

If you want to turn axis like

1 2 3 4 5 6 7 8 9

from

1 2 3
4 5 6
6. ## Thread: to convert two-dimensional array to one-dimensional

by rusyoldguy
Replies
10
Views
1,182

### Hallo! I think, he can use union to make it...

Hallo!

I think, he can use union to make it easier:

#include <stdio.h>

void initArray(int (*array)[], int n, int init)
{
for (int slei = 0; slei < n; slei++)
7. ## Thread: A newbies first task in C - Questions

by rusyoldguy
Replies
4
Views
243

### Hi shloa4! It sounds like working with the...

Hi shloa4!

It sounds like working with the normal distribution. In Europe the control limits are by 99 Percent(2.575829 sigma), the warning limits are by
95 percent(1.95996398 simga) distance to...

by rusyoldguy
Replies
4
Views
1,610

### Hallo Alogon! If you use gcc see this page: ...

Hallo Alogon!

If you use gcc see this page:

atoi(3): convert string to integer - Linux man page

see for this:
int atoi(const char *nptr);
long atol(const char *nptr);
long long...
9. ## Thread: works with devices in /dev/*

by rusyoldguy
Replies
3
Views
1,141

### May be you need to have root Permissions to use...

May be you need to have root Permissions to use usb-devices.
For example if you want to use an usb-stick with windows emulated on qemu-kvm
you need first to login as superuser.
Then, start...
10. ## Thread: how to pass values into getchar in gdb

by rusyoldguy
Replies
3
Views
694

### other example: /* getchar example :...

other example:

/* getchar example : typewriter */
#include <stdio.h>

int main(int argc, char **argv)
{
int c;
puts ("Enter text. Include a dot ('.') in a sentence to exit:");
11. ## Thread: how to pass values into getchar in gdb

by rusyoldguy
Replies
3
Views
694

### Hallo bos1234! I hope this code can help you,...

Hallo bos1234!

I hope this code can help you, ignore the german comments.

/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* main.cc
*
* chkkeystroke is...
12. ## Thread: I dont know whats going on with my program

by rusyoldguy
Replies
6
Views
1,521

### Sorry forgot didi.h: #ifndef LI_H_...

Sorry forgot didi.h:

#ifndef LI_H_
#define LI_H_ 2

extern struct StudentData
{
char name[25];
13. ## Thread: I dont know whats going on with my program

by rusyoldguy
Replies
6
Views
1,521

### Hi davic01! Here an example: first student.h:...

Hi davic01!

Here an example:
first student.h:

#ifndef STUDENT_INC_
#define STUDENT_INC_

#include <iostream>
14. ## Thread: How to capitalize first letter in a sentences

by rusyoldguy
Replies
6
Views
1,243

### Hallo laserlight! I think with asentence he...

Hallo laserlight!

I think with asentence he means something like that:
"good wine needs no bush"
or
"the bread never falls but on its buttered side"

The first letter into uppercase:
"GOOD...
15. ## Thread: if not exist, failed

by rusyoldguy
Replies
3
Views
1,035

### Or see this example. /** opnclose.c */...

Or see this example.

/** opnclose.c */
#include <stdio.h> /* printf, fopen, fclose */
#include <stdlib.h> /* exit */

16. ## Thread: Converting binary array to Byte array

by rusyoldguy
Replies
12
Views
2,453

### binary 11 is 3 decimal uint8_T is an integer...

binary 11 is 3 decimal

uint8_T is an integer type with 8 bit length. The Data type unsigned char is also 8 bit long If you take int(32bit). for this example i think it doesn't matter anything....
17. ## Thread: Converting binary array to Byte array

by rusyoldguy
Replies
12
Views
2,453

### Hallo Brian_Teir! I think it would be better...

Hallo Brian_Teir!

I think it would be better to know from what for a side you want do start to split the whole sentense "rxbuffer" into 8-byte-strings.
In your example you have 4 times with 50...
18. ## Thread: Programm in Freedos and djgpp chashes when using commandline paramters

by rusyoldguy
Replies
7
Views
1,028

### Thank You! Now it works! I think i had...

Thank You!

Now it works!

I think i had Tomatoes on the eyes!
He who makes no mistakes makes nothing.
19. ## Thread: Programm in Freedos and djgpp chashes when using commandline paramters

by rusyoldguy
Replies
7
Views
1,028

### Here a call with given argument: 1608216082

Here a call with given argument:
1608216082
20. ## Thread: Programm in Freedos and djgpp chashes when using commandline paramters

by rusyoldguy
Replies
7
Views
1,028

### sorry, my fault.# In the original code i used ...

sorry, my fault.#

In the original code i used

int argc

What i don't understand is, when i call the programm without any argument it crashes in FreeDOS.
The same EXE works fine if i call it...
21. ## Thread: Programm in Freedos and djgpp chashes when using commandline paramters

by rusyoldguy
Replies
7
Views
1,028

### Programm in Freedos and djgpp chashes when using commandline paramters

Hallo guys!

I have tried just for fun to work with FreeDOS 1.2 and djgpp to write some
programs in c.
But when i try to access arguments argv[] from (example)

int main(it argc, char...
22. ## Thread: strcmp with numbers

by rusyoldguy
Replies
9
Views
2,833

### By your first example you need to include...

By your first example you need to include
#include <string.h>
After this change i've got 1 as return value of strcmp too.

jimblumberg's exampe returns 49 of strncmp. That's the ASCII-Value of...
23. ## Thread: Can you execute a function from the name stored in a variable?

by rusyoldguy
Replies
8
Views
1,602

### May be this example can help you: #include...

May be this example can help you:

#include <iostream>
#include <math.h>

struct tbl
{
std::string cmdtxt;
double (*funki)(double a);
24. ## Thread: implementing square root function

by rusyoldguy
Replies
8
Views
2,030

### Take a look to: YouTube...

Take a look to:
25. ## Thread: what is goto?

by rusyoldguy
Replies
3
Views
783

### Hallo muhammetekurt! Salem is right, this code...

Hallo muhammetekurt!

Salem is right, this code is terrible.
The only way to delete goto is to swap out some code to functions:
Like to change your example to this:

first hungarian.h:

...
Results 1 to 25 of 66
Page 1 of 3 1