Anonymous
include <stdio.h> int main() { printf("Hello World"); return 0; } What am I doing wrong here
Vignesh
Can anyone tell is there any in built function to generate a random number between -1,1 in cpp?
mayway
Anyone know any good DSA c++ course in yt or website
king king
im trying to re -assign makefile variables but the make file is angry. there is another way to do it without errors ? # Priority_Queue # #*****************************************************************************# test_obj = obj/priority_q_main.o objects = obj/priority_q.o \ obj/sorted_list.o \ obj/dlist.o DEPS = include/priority_q.h \ include/sorted_list.h \ include/dlist.h $(objects): obj/%.o: src/%.c $(DEPS) $(CC) $(CFLAGS) -c $< -o $@ $(CPPFLAGS) $(test_obj): obj/%.o: test/%.c $(DEPS) $(CC) $(CFLAGS) -c $< -o $@ $(CPPFLAGS) priority_queue: $(objects) $(test_obj) $(CC) $(CFLAGS) $^ -o $@ $(CPPFLAGS) clean_priority_queue: rm -f $(objects) $(test_obj) priority_queue # Sorted_List # #*****************************************************************************# test_obj = obj/sorted_list_main.o objects = obj/sorted_list.o \ obj/dlist.o DEPS = include/sorted_list.h \ include/dlist.h $(objects): obj/%.o: src/%.c $(DEPS) $(CC) $(CFLAGS) -c $< -o $@ $(CPPFLAGS) $(test_obj): obj/%.o: test/%.c $(DEPS) $(CC) $(CFLAGS) -c $< -o $@ $(CPPFLAGS) sorted_list: $(objects) $(test_obj) $(CC) $(CFLAGS) $^ -o $@ $(CPPFLAGS) clean_sorted_list: rm -f $(objects) $(test_obj) sorted_list
Anonymous
Can someone edit the dll file?
mayway
Anyone know any good DSA c++ course in yt or website??????
Captain
Anyone know any good DSA c++ course in yt or website??????
https://youtube.com/playlist?list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P
Disha
#include <stdio.h> #include <stdlib.h> #include <string.h> #define LSIZ 128 #define RSIZ 10 int main(void) { char line[RSIZ][LSIZ]; char fname[20]; FILE *fptr = NULL; int i = 0; int tot = 0; printf(" Input the filename to be opened : "); scanf("%s",fname); fptr = fopen(fname, "r"); while(fgets(line[i], LSIZ, fptr)) { line[i][strlen(line[i]) - 1] = '\0'; i++; } tot = i; printf("\n The content of the file %s are : \n",fname); for(i = 0; i < tot; ++i) { printf(" %s\n", line[i]); } printf("\n"); return 0; } Enter
Disha
whats the problem in it
Disha
Consider the Users.txt file shown below. Write necessary code to read all users from the file, store them in variable (you have to use array of structure) and add new user in the file. Users.txt Format 01 Md. Abdur Rahman 03 05 1991 Software Engineer 02 Hamid Sheikh 08 04 1992 QA Engineer <User ID> <Name> <Date of birth as day month year <Occupation> Enter You sent Open Photo
Disha
it is the question
Anonymous
please help me with this execise write a program to display factorials of 1,2,3,4,and 5
Anonymous
what is dring in this program for multiplication #include <stdio.h> int main() { int n, i; printf("Enter an integer: "); scanf("%d", &n); for (i = 1; i <= 10; ++i) { printf("%d * %d = %d \n", n, i, n * i); } return 0; }
Ultima Filium
Hey what's up people what data type can store 1.953456E301 and print it on the screen in full in C++
Ultima Filium
cause I'm using long double and it's printing it in exponential form unsigned long long Int can't get it done I'm confused
Ultima Filium
Anonymous
Anyone know why this throws error? hastebin.com/uxowujecoy.cpp I'm creating the memory with new, so it's supposed to stay until the program ends, right?
Anonymous
Hello everyone, started c++ few days ago, tried writing this code to find employee details for the first 2 questions, works fine and then skips to the last without asking user input for 3 and 4, any problem in it? #include <iostream> using namespace std; int main() { // declaring variables char employeenumber[30]; char name; char department; double salary; //prompt use input cout<<" what is your employee number?"<<endl; cin>>employeenumber; cout<<" what is your name? "<<endl; cin>> name; cout<<"what is your department?"<<endl; cin>> department; cout<<"what is your salary?"<<endl; cin>> salary; }
Talula
Hello everyone, started c++ few days ago, tried writing this code to find employee details for the first 2 questions, works fine and then skips to the last without asking user input for 3 and 4, any problem in it? #include <iostream> using namespace std; int main() { // declaring variables char employeenumber[30]; char name; char department; double salary; //prompt use input cout<<" what is your employee number?"<<endl; cin>>employeenumber; cout<<" what is your name? "<<endl; cin>> name; cout<<"what is your department?"<<endl; cin>> department; cout<<"what is your salary?"<<endl; cin>> salary; }
#include <iostream> using namespace std; int main() { // declaring variables int employeenumber; string name; string department; double salary; //prompt use input cout<<" what is your employee number?"<<endl; cin>>employeenumber; cout<<" what is your name? "<<endl; cin>> name; cout<<"what is your department?"<<endl; cin>> department; cout<<"what is your salary?"<<endl; cin>> salary; }
Count
You can take employee number as int or string is also an option
Jui
Im a beginner in C language and I had a silly question.. Does C follow BODMAS rule for arithematic operators?
Anonymous
#idesfree
GodXAnubis
Atom too add that
Talula
Atom too add that
Atom is an editor not IDE.
Anonymous
Add codeblocks for windows
Anshu
Hiii.. I'm beginner.. in c/c++
Anonymous
Can anybody help me pls?
do you mean this? https://www.tutorialspoint.com/cprogramming/c_operators_precedence.htm
Anonymous
Yaa ... thanks
as I think, not in every case it will be like in BODMAS rules
Jui
as I think, not in every case it will be like in BODMAS rules
C has it's own precedence i guess.. i got to know that if we think about only arithmetic binary operators, it follows BODMAS to some extent.. bt as internet showed me.. multiplication and division, remainder has same precedence priority, and also addition subtraction.. so it operates from left to right as per the operation. We cant say it follows BODMAS no? Am I right?
Kartik
Correct.
Anonymous
yes, shure we can't
Jui
Finally I got ans to this basic doubt.. actually internet and one of my friend confused me abt this😅 thank you guys you are awesome 😊
Kartik
@Dwadashangula Our Pleasure.
Anonymous
Anonymous
Best ide free for c?
Anonymous
Best ide free for c?
@chandradeepdey
Anonymous
Anonymous
^
Anonymous
if you are a student, CLion
Anonymous
Visual Studio
Im on Linux
Anonymous
Im on Linux
CLion then
Anonymous
or Qt
Anonymous
if you are a student, CLion
in your opinion python or c is better to start programming
Anonymous
CLion then
I need free
Anonymous
@odex64
stop tagging people randomly
Anonymous
python
Okk thanx
Anonymous
I need free
are you a student?
Anonymous
No
oh. then try Qt Creator or something
Anonymous
actually you can even try Eclipse CDT
Anonymous
Horribly slow
ye but has a lot of features
Anonymous
ye but has a lot of features
Visual Studio is much better.
Anonymous
Pradevel (Pratyush)
Im on Linux
You can try CLion or VSCode
kc
vscode cmake?
Anonymous
Sergeant Stedenko
Anonymous
Anonymous
.
On Linux, you can just use VS code. With the right set of plugins, it is as good as an IDE.