Hermann
Sergeant Stedenko
publications date 1985 lol
Brilliant book, it took me 2 weeks of reading this book and typing in all the examples to learn C programming. 👍🏻
klimi
Hermann
Sergeant Stedenko
Sergeant Stedenko
Hermann
klimi
klimi
i don't know where you could buy the pdf of 3rd edition
Sergeant Stedenko
for me yes
Ok good to know, I'll take a look. 👍🏻
Sergeant Stedenko
Hermann
I don't think it's useful to consult books from 50 years ago for programming in general
Hermann
Hermann
👍🏿👍🏿
God did
Anyone to teach me how to use code block
Tarık Emre
I am getting an error in this code can you help me
Tarık Emre
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#define SIZE 50
int main(int argc, const char* argv[]) {
char text[SIZE];
char* numberStr1 = "256";
char* numberStr2 = "558";
char* numberStr3 = "179.25";
char* numberStr4 = "247.32";
int number1 = atoi(numberStr1);
int number2 = atoi(numberStr2);
int total1 = number1 + number2;
printf("Total1 -> %d\n", total1);
float number3 = atof(numberStr3);
float number4 = atof(numberStr4);
float total2 = number3 + number4;
printf("Total2 -> %.2f\n", total2);
printf("enter a string of characters: ");
gets(text);
printf("numeric characters in the char index you entered: ");
int i;
for (i = 0; i < SIZE; i++) {
if (isdigit(text[i]) == 1) {
printf("%c", text[i]);
}
if (text[i] == '\0')
break;
}
return 0;
}
Mesay
Please help me with this program, write c++ programmig and run aprogram that read five students and five courses each courses are taken by each student
Anonymous
struct Student(){
std::vector<Course> courses;
};
struct Course(){
std::vector<Student> enrolled;
}
Int main(){
std::vector<Student> studs;
std::vector<Course> courses;
/*read in information about
Students and construct
them
*/
for(char i{0}; i < 5; ++i){
studs.emplace_back(Student());
}
/*do the some for courses
and assign the students
*/
for(char i{0}; i < 5; ++i){
courses.emplace_back(Course());
for(auto s : studs){
courses[i].push_back(s);
}
}
/*assign all classes to every
student
*/
for(auto s : studs){
for(auto c : courses){
s.courses.push_back(c);
}
}
}
Mesfin Markos something like that? Should be a rough sketch of what you need. Good Luck!
Mesay
Thank you
God did
Suka
ʟᴏɴᴇᴡᴏʟꜰ
I need some help in java..?
klimi
ʟᴏɴᴇᴡᴏʟꜰ
I went to some java grps but they aren't responding 😅
ㅤ
Rewrite your code to C++ and ask this question here 😃
Anonymous
Void(*fp)();
How to read this statement
Pavel
Void(*fp)();
How to read this statement
I guess it is a variable named fp of type pointer to void function that doesn't take arguments. But I'm not sure
You can check with https://cdecl.org/
Golden Age Of
Void(*fp)();
How to read this statement
its pointer to function - void Foo() for example, but you need to assign it with some function with common signature
like this:
void Foo()
{
cout<<"Im foo"<<endl;
}
void (*fp)() = Foo;
Hentai-kun
Anyonw plz tell me the order of topic i should learn
Anonymous
Ariyan
Write a program two calculate the value of f= x²+5x+7
Ariyan
If someone slove this problem then told me
Anonymous
constexpr int x{5};
return x*x+5*x+7;
Purnendu like that?
Mahdi
Programming language c++ how much income and how much money can be earned
Anonymous
heavily depends on your country and what position/company you actually work. I don't think there is a general answer to that.
But im also not the most qualified to comment on that
バレンタインがいない柴(食用不可)
Ammar
Anonymous
#include<stdio.h>
int main(){
unsigned char c=(int)0.54;
for(;c++;printf("%d",c));
printf("%d",c);
return 0;
}
Can anyone say what will be the output
Anonymous
Pavel
Pavel
I am getting output as 1
But in internet they have given output as 033
That's why I'm asking
You could have mentioned that.
In the first line c equals to zero because it being rounded down (floored?) when converted to unsigned char.
Then you have a loop that ends with semicolon. That means the next printf statement is not part of the loop.
The condition part of the loop contains postincrement operator (c++), which means that it will increment c but will return the old value.
So the first iteration, the first thing is happening is condition part of the loop is being called, c is increments to 1, but zero returned.
Zero converted to false (by rules of convertion to bool), which means loop should be ended at this point.
The next step, printf is called that prints 1
Pavel
I don't know how they get 033 to be honest
Anonymous
king king
Hwy good eve
king king
Can i aske for course recommendation ?
I'm looking for a C Macros course
But i can't find such a course nowhere.....
Anonymous
Probably if you search for preprocessor statements or something would come up with more helpful results. Not sure. Either way there where really good resources from some university on the preprocessor.
To be honest there is not too much to know. But you can construct quite complicated things with it. Im my honest opinion one should barely use it.
But there are certainly other opinions on that topic.
king king
Anonymous
Sure no problem :)
Anonymous
Any thoughts on modules in C++? Somehow i still default to using headers😅
ThanuC
Shall I join the class for C++
Any classes?
バレンタインがいない柴(食用不可)
Anonymous
Hell
Anonymous
I am something new in C ++ it is a pleasure to be in this group
Elijah
I Like the families of this group, I have been new for this group, but I want to know something. I want to be the best computer scientist since I was a child.would you mind to help me?
Pratiksha
Which is best you tube channel for learning c language
Pratiksha
Arnold
I am new in programming and would like to have a start with some examples can one help on how i can go on with this please?
Kampala City Council would like to implement LCCF (Low Carbon Cities Framework). As such develop a
Carbon Calculator Program that helps Kampala City Council to test and simulate where they can reduce
GHG (Green House Gases) in the city by 15%. Kampala City Council has identified the following variables to
be major contributors to GHG in the city: Industry – 19%, De-forestation – 17%, Power & Energy – 15%,
Agriculture – 14%, Transportation – 10%, Waste – 10%, Water Management – 10% and Buildings – 5%.
The program must ask the user to input the percentage of cuts in the relevant 8 variables in the given
order amounting to a total of 15% cut of GHG.
klimi
mito
Arnold
klimi
Just a small program elaboration for the problem .please
so you expect us to elaborate on something you haven't even started the topic? you haven't asked any question... it feels like you don't even want to do it by yourself and just want someone to do it for you
mack
Anonymous
Can any one guide me to find for good youtube channel of c language
mayway
Hi I'm new to programming I need help ..this group is not allowed for media ..
~Maverick
~Maverick
Anonymous
Hi i'm new to programming . theas days , I learn c++ and i wanna improve my c++ knowledge 🖐️🙂 . As I think i can get some help from this group
Anonymous
#include<iostream.h>
#include<conio.h>
void main()
{
int i,n,count=0;
cout<<"enter size of array";
cin>>n;
int a[n];
cout<<"enter array elements";
for(i=0;i<n;i++)
{
cin>>a[i];
}
for(i=0;i<n;i++)
{
if(a[i]==0)
{
a[count]=a[i];
count++;
}
}
cout<<count;
}
Anonymous
It's not counting zero what's the issue with this?