Leo
What is vector in c++
Let me 🔎 Google that for you: 🔎 what is vector c++
MᏫᎻᎯᎷᎷᎬᎠ
Anonymous
Please I need c++ ebook
T
THANKS YOU ! Happy to be here
Ritu Raj
I never tried it Is it cool?
Noh it is school 🤓.
Anonymous
Hello, I just completed a chapter in a programming book, and well I felt I understood everything taught in the chapter. But after completion, I attempted the questions the chapter and the first parts were favourable but moving on, the questions became harder. It took me several hours to complete that very one chapter and I want to know if I should try to go over the chapter to get a better grasp of it.
Anonymous
Anyone help me
Anonymous
Anonymous
Need a help to print thos Pattern
Death
You see every 'i'th row has a cyclicity of 'i+1'
Death
When we start indexing from i=0
Anonymous
Can u make please
Anonymous
In c or cpp or java
Anonymous
Given two non-negative integers A and B, and limits X and Y,find the smallest integer Z which lies between X and Y such that (A&Z).(B&Z) is maximum possible. &=Bitwise product Can anyone help me in this
Anonymous
Can anyone help me in this
Ronak 🇮🇳
const String& operator+(const String&); String operator+(const String&); Here, String is a class and It thorws an error that cant overload functions distinguished by return type alone. why it showing this error and how can I make it happen without error?
Ronak 🇮🇳
okay my bad.
Anonymous
Anonymous
How answer is 433
Vikas
Hello I am vikas I am new in this group . So you help me for solving my problem
Anonymous
Anyone help Mei in sorting vases
Ronak 🇮🇳
you are passing reference arguments to the function. Here you are assigning the 3 to a , so 3 is put in address of b. therefore value of b is changed to 3 and same happen to a which has 4 in its address and the function return a which is 3 and is assigned to c. So your b is 3, a is 4 and c is 3.
Vikas
Vikas
Tell me how can I solve this
Thim
Thim
This is my text file
Thim
And i have made a program to read this
Thim
#include<stdio.h> #include<stdlib.h> int main() { char id[20]; char id2[20]; char name[20]; int basic; int pn; FILE *fptr; fptr = fopen("Edata.txt","r"); fscanf(fptr,"%s %s %d %d ", &name, &id, &pn, &basic); printf("Input ID number: "); scanf("%d", &id2); while(!feof(fptr)) { if(id == id2) { printf("%s %s %d %d ", &name, &id, &pn, &basic); } fscanf(fptr,"%s %s %d %d ", &name, &id, &pn, &basic); } return 0; }
Thim
I want to giva id number and display about the other details of that person
Thim
Bt my program does not work
Thim
Also 1st text file has done by this separate program
Thim
#include<stdio.h> #include<stdlib.h> int main() { char id[20]; char name[30]; int basic; //basic salary int pn; // phone number char con; // continue to the loop FILE *fptr; fptr=fopen("Edata.txt","a"); printf("Start getting employee DATA(y/n) :"); scanf("%c", &con); fprintf(fptr," Name ID PhoneNumber Basic salary "); while(con=='y') { printf("Enter Name: "); scanf("%s", &name); printf("Input the Id number: "); scanf("%s", &id); //getting employee's ID number printf("Input the phone number: "); scanf("%d", &pn); //getting employee's phone number printf("Input the basic salary: "); scanf("%d", &basic); //getting employee's basic salary fprintf(fptr,"\n %s %d %d %d",name,id,pn,basic); printf("Getting Another person(y/n) : "); scanf("%s", &con); } fclose(fptr); printf("Thank you very much!!!"); return 0; }
Dont
Did you try to compile the code to see the output? Because it's not 39 and it's juste a simple incrementation
Anonymous
Why we use alwayz pointer in declaration of file in C ?
noop
Depend on the length of phone numbers, it is not impossible to save phone numbers in unsigned long integers. It can also be used for sanity check: if the input is a number.
Anonymous
FILE*?
I have dought that why we use pointer in declaration of file?Why we not use single variable.see all program of files use pointer in it whyyy.?
Asdew
That's because the f* functions (fopen, fread, fwrite, fclose) need to 1. give you a new FILE (fopen needs to do that) 2. modify the FILE (although you could pass them a FILE like &file, but remember 1.).
Jayram
Best Book To Learn C language ?
Anietie
Jayram
Thank You
Anonymous
Convert decimal number to hex and oct in one line
$ameer
What is recursion
Dima
What is recursion
/warn instant question on join (read the rules)
$ameer
/warn
$ameer
Ok
$ameer
But i want to know recursion in c program
Artöm
But i want to know recursion in c program
Situation where a function calls itself
Cool Guy
@Neko_cpp why the hell do you delete chat
Cool Guy
i didn't spam anything
klimi
i didn't spam anything
Alright ¯\_ (ツ) _/¯
Cool Guy
I need an algorithm not a program
Dima
the first link in the google dammit..
Anonymous
Hi! Someone asked where to order ChatBots for Telegram. The guys did it to me. The result is awesome. Who needs contacts I will answer in messages. So that there is no spam
Ushie
Hi Pm is what
Dima
Lol
klimi
Hi Pm is what
Personal message
Ushie
In coding line
klimi
In coding line
Personal message
klimi
Thanks :)
Nils
Hi, how do I free up space used by an array in C? Not as in giving it back to the os (free()) but for later reuse in code.
Nils
you can just zero it and keep
But doesn't it still use memory that can't be used by other arrays??
Dima
there are some types of allocators which are working like that
Nils
there are some types of allocators which are working like that
So I can simply… memset(array, 0, len) to make the space used by array available again to other variables?
Nils
Variables that are initialised later
Dima
its reserved in a memory, so you can just zero it and initialize again
Dima
by initializing I mean not allocating again but setting the values
Anonymous
what we're talking about?
Nils
what we're talking about?
making space used by arrays available to other variables without giving space back to OS
Dima
if it belongs to array so it will belong only to that object