Talula
I just asked is it good for programming?
No that is fake stuff... someone trolling I guess.
Prince Of Persia
No that is fake stuff... someone trolling I guess.
thanks so if it's fake I can create real😂
Talula
thanks so if it's fake I can create real😂
Why bother? Create an app that'll make you billions rather than making a new language which no one will use.
Prince Of Persia
Why bother? Create an app that'll make you billions rather than making a new language which no one will use.
yeah creating an app is just for making money but creating something which can create apps it's teach you many thing that only few people know
Gulshan
https://del.dog/osugunulof.txt
Gulshan
I am getting TLE while submitting....
Gulshan
any suggestion so that i can optimize the code
Igor🇺🇦
I am getting TLE while submitting....
https://en.wikipedia.org/wiki/TLE? Non of these are related to programming
Jasur Fozilov 🐳
https://del.dog/osugunulof.txt
What is this calculating ?
Gulshan
What is this calculating ?
Number of houses one can buy in a given budget
mov $22, %rax
𒈞Mr.ℭɎᗾℜ𐍈Ᏻ𒈞
/notes
Gulshan
/notes freeprogrammingbooks
Manit
#0_to_show_item_use"#item"
Manit
offtopic
Manit
#offtopic
Igor🇺🇦
Time limit exceeded 🙄
Why are you sorting the same array n times?
Anonymous
how can I build a calander can you give me some hint?
Anonymous
how can I build a calander can you give me some hint?
What calendar you mean how to write a calendar program
Anonymous
#include <stdio.h> #include <string.h> int main() { FILE *fp = fopen("example.txt", "r"); char buffer[100]; int cmp = strcmp(fgets(buffer, 50, fp), "banana"); if (cmp == 0) { printf("It's banana"); } else { printf("It's not banana"); } return(0); }
Anonymous
why it's giving me segmentation fault?
And what does it actually do?
Anonymous
And what does it actually do?
print something if the condition are met
Anonymous
Check fgets return value first
Anonymous
And fopen
Anonymous
I check the fopen does not return NULL
Anonymous
The variable defined by &, means variable is reference So what does this mean? const int& x = 50; We defined the reference variable with a number. What is this variable referring to now?a
50 is a temporary object and should be destroyed by ; But! const& (const reference) extends a lifetime of the temporary object to a lifetime of the reference. Is that clear or too hard to understand? P. S. I don't recommend you using this feature as it can lead to errors and is not really good
Anonymous
https://del.dog/osugunulof.txt
Lines 25—30 Wtf? Why do you sort in a loop?
Anonymous
Where did you learn c ++?
Books, C++ conferences, Work I'm still learning
Pavel
50 is a temporary object and should be destroyed by ; But! const& (const reference) extends a lifetime of the temporary object to a lifetime of the reference. Is that clear or too hard to understand? P. S. I don't recommend you using this feature as it can lead to errors and is not really good
Agree. One thing that it doesn't extend lifetime of member variables of the temporary object that goes out of scope, but some developers don't think about this and expect that const ref will still be valid in this case.
Anonymous
How many accounts do you have?
Pavel
Enought for you
Anonymous
Message from @dkuch_idr It's not only that. You can find the whole description here for example https://stackoverflow.com/questions/2784262/does-a-const-reference-class-member-prolong-the-life-of-a-temporary
Eturnus
#include<stdio.h> int main () { FILE *fp; char ch; fp=fopen("/storage/emulated/0/Download/sample1.txt","r"); while(1) { ch=fgetc(fp); if(ch==EOF) break; printf("%c",ch); } printf("\n"); fclose (fp); return 0; }
Eturnus
FORTIFY: fgetc: null FILE* [Process completed (signal 6) - press Enter]
Eturnus
In phone
Anonymous
Because it is not able to open the file
Eturnus
What changes need in this programto open file
Phil
I think that the user who runs your program isn't in the authorized group to access the file
Luffy
Can someone suggest me a good resource for revising c++ or a course or something
Gulshan
Lines 25—30 Wtf? Why do you sort in a loop?
so that I don't have to worry about the houses to select of low rates.. and they will be added to the counter....
Anonymous
No
Gulshan
https://del.dog/ucypagnero.txt
Gulshan
The easiest thing I thought is to sort the list first
Anonymous
Why don't you JUST sort?
Gulshan
Again Why Do You Sort In A Loop?
ohh... Fixing that.... but I have to sort them in the test case loop
Gulshan
ohh shit
Gulshan
that was a mistake
Gulshan
https://del.dog/beghupegre.txt
Gulshan
passed
Gulshan
😁😁😁😁 sorry for wasting your time.... I didn't checked that I have sorted the array in loop
Anonymous
In C language Consider the following data structure, representing a binary search tree ordered on the node_id field. struct node{ int note_id; char node_content[30]; struct node * right, * left; }; Write the recursive function to print the content of the node with the smallest id of the tree.
Pavel
https://del.dog/beghupegre.txt
Your problem description does not say anything about range of the N. If N can be reletivetly large (millions) you program would not work
Aakash
https://del.dog/beghupegre.txt
You need to understand declaring/initializing of variables within {} scope.. of your program. Try each case..1by1.. — #include <iostream> int main() { //int x=0; //Case:1 for(int i=0; i<3; i++) { //int x=0; //Case:2 for(int j=0; j<3; j++) { int x=0; //Case:3 std::cout <<"\n" <<&x <<":" <<x; x++; } } return 0; } 🙃
Aakash
https://del.dog/beghupegre.txt
Variables looks good🙃
Hanz
Can anyone help?
Exam question?
Anonymous
Can anyone help?
No one will solve for you If you have an exact question about the problem — just ask it
Bumpy
Why string that starting with space is not good? what is the reason?
Bumpy
" example"
حماد
I use goto method to control the flow of program... Is there any good methods available in C++ or goto is good?
حماد
You are saying goto is not good?
حماد
What is the alternative
Anonymous
Lol
Anonymous
If/else Loops
حماد
But sometimes too many loops causes trouble in understanding the code
Pavel
If it's used as break for inner loop, then putting the loop to a function can help (well, arguably sometimes goto reads better)
Pavel
But sometimes too many loops causes trouble in understanding the code
Loops showing the execution flow, goto doesn't show anything. When you read the code with goto, you need to pay more attention to understand the flow correctly and not miss something.