Nameful
yes
to most search engines, putting a - before your search term means "exclude this term"
Ehsan
what warning? i just wanted to know what -wall is
it’s a flag that lets the compiler display warnings 🙂
Hariyana Grande
somebody told me to compile with -wall
Hariyana Grande
yes wait
Chr
Hi I am looking for job on C domain
Chr
Can any one suggest Me how to prepare resume and what should I do
Thierry
!report DARONG pm without asking
Roxifλsz 🇱🇹
!report DARONG pm without asking
Post a screenshot of him PMing you (the start of the conversation)
Thierry
Sorry already reported and blocked/deleted chat on tg
Roxifλsz 🇱🇹
preferably to the offtopic group
Meh, I wouldn't be able to see it then
Roxifλsz 🇱🇹
Sorry already reported and blocked/deleted chat on tg
Well then I don't really have proof that he PMd you 🙃
Roxifλsz 🇱🇹
Ah
Roxifλsz 🇱🇹
Well next time I'll just ask to drop the screenshot into my PMs
Thierry
Well just wanted to inform and potentially prevent further pms
klimi
we should make meta group
Tasneem🩷
Help me
ARNAV
Tasneem🩷
(Perfect number ) a positive integer is called a perfect number if it is equal to the sum of all of its positive divisors , excluding itself .for example ,6 is the first perfect number because 6=3+2+1. The next is 28=14+7+4+2+1. There are four perfect numbers less than 10000.write a program to find these four nembers?
Tasneem🩷
(Simulation head or tail) write a program that simulates flipping a coin one million times and displays the number of heads and tails?
Anonymous
Yes
/warn no
Tasneem🩷
??
klimi
Anonymous
??
Read rules
Pavel
??
It's not a group where people will do tasks for you, it's a group for people who want to learn
מנחם
Why this code fly after 8 numbers? (the program is creates a dynamic array, and reads 15 numbers) int *new_arr = new(nothrow) int(15); if(new_arr == nullptr) exit(1); cout << "Enter " << 15 << " values: "; for (int i = 0; i < 15; i++) cin >> *(new_arr++);
Anonymous
It's not an array
Ilya
Array is constracting via sqare braces
Suka
perhaps? public: character(const char *ptr) { this->ptr = const_cast<char*>(ptr); } void *operator new(size_t size); // you miss the ;
Rizaldi
hello sir, i want to ask. how to compare array?
Hariyana Grande
static char s[] = {"black", "white"}; //why this not valide static char *s[] = {"black", "white"}; //but this is valid
Ilya
Because the first is just string
Ilya
The second is array of strings
Hariyana Grande
so cant we say first one as array of char
Ilya
No, we cant
Rizaldi
maybe strcmp(arr1,arr2)
can I combine this with if else? so if thats array its same i will give some command
Hariyana Grande
ok and there is no string data type right in c ?
Ilya
String is an array of chars
Ilya
char* or char[]
Suka
ok and there is no string data type right in c ?
in c string is array of char with null termination cmiiw
Ilya
Also you have such functions like strcmp()
Ilya
See cppreference.com - C section
Ilya
string.h header
Hariyana Grande
i am confuse let me paste the program jst sec
Hariyana Grande
oops wrong
Hariyana Grande
#include<stdio.h> int main() { static char *s[] = {"black", "white", "pink", "violet"}; char **ptr[] = {s+3, s+2, s+1, s}, ***p; p = ptr; ++p; printf("%s", **p+1); return 0; }
Hariyana Grande
so my question was how can you assing a pointer to char without its being declared
Hariyana Grande
the first line of code
Roshan
Is there any js ajax group?
Hariyana Grande
i mean where is array of characters all i see is strings in first line
Ilya
See: char - simply one character char* or char[] - string (array of chars)
Ilya
char *[] or char** - array of strings
Ilya
If you want to get one char from string, do: char ch = str[index_of_character]
Hariyana Grande
See: char - simply one character char* or char[] - string (array of chars)
char* or char[]- string , is it correct ? so whenever i see char* its string right?
Ilya
Yes. And a pointer to the first character simultaneously
Ilya
Read about arrays in C and about pointer arithmetic
Pavel
char* or char[]- string , is it correct ? so whenever i see char* its string right?
Except when it's a pointer to a single character (which is rather uncommon case for char)
Hariyana Grande
so i can declare like this - char* s[]={"how", "are","you"}; ?
Ilya
Yes
Hariyana Grande
ok thank you so much for clarifying this
Ilya
You'd better to watch video or read smth about arrays in C, pointer arithmetic and two possible ways to create arrays: WITH specifiyng size and WITHOUT it
Hariyana Grande
i got confused cause i studied pointer this was- first step- int a; step 2- int *p step 3 p=&a; so i was woried where the first step gone in above program lol
Hariyana Grande
*this way
Ilya
These steps are used when you want to take an address (pointer) of the already existing object
Ilya
If you are creating smth like arrays, you arent needed first step
Hariyana Grande
oh i see it makes sense now i didnt know that
Hariyana Grande
pointers are pain
Ilya
but you still can do this way int arr[20]; int *parr = arr; Welcome to the C bro😂