Roman
you can you think of compile-time as when compile-time instructions get substituted by its result while program is compiling, example: sizeof(int) will be just 4
Ilia
you can you think of compile-time as when compile-time instructions get substituted by its result while program is compiling, example: sizeof(int) will be just 4
Compile-time and Runtime are the two programming terms used in the software development. Compile-time is the time at which the source code is converted into an executable code while the run time is the time at which the executable code is started running
Edgelord
What is the difference between compile time operator and run time
Compile time operator is predefined operator & doesn't change based on user input. Run time operator changes based on user input.
Sid
I know that after compilation a exe file is created which is executed
Sid
I want to know about compile time operators and run time
Sid
Yup
Edgelord
Can you plz explain it with example
Your question has been asked in stack overflow. They have elaborate examples.
Edgelord
I need admin approval before posting the link here. But just type your question exactly as you typed here in Stack overflow.
Sid
You dm me
Sid
Personally
Prince Of Persia
Наталья
Hello everyone, who can help with the problem?
Anonymous
Hello everyone, who can help with the problem?
you can desribe your question directily
Наталья
you can desribe your question directily
An application that simulates student retakes of exams: - there is a queue of students retaking the exam to the teacher; periodically new students are added to the queue, and at some interval a student is sent from the queue for retake. - the teacher has a set of tickets in the form of a list, from which you can only take from above or below.
Наталья
- the student takes the ticket, and also pulls out the top task from the pile with tasks. The student who has accepted the assignments enters the queue of responders. A student comes out of the queue periodically and answers the questions of the ticket and the task. After the answer, the ticket and the task are returned back to their lists. If he passes, then he is removed from the number of retakers, otherwise, he again falls into the end of the queue for retake. Instruction. All operations in the application must be performed with a certain interval (from 1 to 3 seconds). Modeling is carried out in the form of an endless cycle of randomly arriving operations.
Наталья
I don’t really understand how to make this panel, I need to do the second one based on 1 task and there are arrays
Наталья
Task 1. Implement data structures: stack, queue, deque - using: - options 1,4,5,8,9,12,13 - arrays - options 2,3,6,7,10,11,14,15 - linked lists.
Наталья
Well, I already threw 1 task
Anonymous
Hyy
Anonymous
I think in the task1 you should implement the fundamental model and corresponding operation function
Наталья
what are the numbers means?
These are the options on the list, I'm on the list 12, which means that in task 2 there will be 3 options
Anonymous
what's the task 2
Наталья
I can send the code 1 task
Anonymous
I still can't understand 😂
Наталья
Anonymous
In the assignment, what are you expected to do
Anonymous
and what all the tasks are
Anonymous
and what you had implement and your bottleneck
Anonymous
😂
Наталья
So, according to task 1, I need to implement task 2
Наталья
#include <iostream> #include <Windows.h> #include <dos.h> #include <stdio.h> #include <time.h> using namespace std; struct stack { int a[1000]; int head = -1; //Индекс крайнего элемента. void push(int x) { head++; a[head] = x; } int pop() { if (head != -1) { head--; return a[head + 1]; } else { //Ошибка, попытка извлечь элемент из пустого стека. } } bool is_empty() { return head == -1; } }; struct queue { int a[1000]; //Для более лаконичной реализации работы, мы будем //хранить указатель не на последний элемент, а //на следующий за ним (несуществующий). //Это, в частности, позволит нам проверять очередь на пустоту //простым условием head == tail int head = 0; //Индекс первого элемента. int tail = 0; //Индекс элемента, следующего за последним. void push(int x) { a[tail] = x; tail++; } int pop() { if (head != tail) { head++; return a[head - 1]; } else { //Ошибка, попытка извлечь элемент из пустой очереди. } } bool is_empty() { return head == tail; } }; struct deque { int a[2000]; //Используя такие начальные значения индексов, у нас //будет свободная память как слева, так и справа. int head = 1000; //Индекс первого элемента. int tail = 1000; //Индекс элемента, следующего за последним. void push_front(int x) { head--; a[head] = x; } void push_back(int x) { a[tail] = x; tail++; } int pop_front() { if (head != tail) { head++; return a[head - 1]; } else { //Ошибка, попытка извлечь элемент из пустого дека. } } int pop_back() { if (head != tail) { tail--; return a[tail]; } else { //Ошибка, попытка извлечь элемент из пустого дека. } } bool is_empty() { return head == tail; } }; int main() { setlocale(LC_ALL, "ru"); stack a; system("pause"); }
Наталья
Task 1
Anonymous
Ok, in task 1, you implement the needed data structure using arrays
Anonymous
and what's the task 2?
Наталья
and what's the task 2?
Option 3. An application simulating the retake of exams by students: - there is a queue of students retaking the exam to the teacher; new students are added to the queue periodically, and a student is sent out of the queue to retake at some interval. - the teacher has a set of tickets in the form of a list, from which you can take only from the top or bottom. - the student takes the ticket, and also pulls out the top task from the stack of tasks. The student who has taken the assignments gets into the queue of the responders. A student periodically comes out of the queue and answers the ticket questions and the task. After the answer, the ticket and the task are returned back to their lists. If he passes, then he is removed from the number of retakes, otherwise, he again gets to the end of the queue for retake. Indication. All operations in the application must be performed at some interval (from 1 to 3 seconds). Modeling is performed in the form of an infinite cycle of randomly incoming operations.
Anonymous
oh I get it. I mistakenly think the task 2 is teh whole assigment
Anonymous
and now you need to use task 1's data structure to implement the task2, right?
Kaashᅠ
I'm stucked at learning OOPs🙂, should i continue with OOPs concept or go further with File & except handling.. And other things
Anonymous
yes
ok so where do you get stuck? which data struct?
Наталья
Anonymous
I'm stuck on the 2nd task
so you don't know how to begin?
Prince Of Persia
Anyone has C++ config for nvim with native lsp (not coc)?
Наталья
so you don't know how to begin?
Yes, but I did a bit of code, but I think there's nothing wrong at all
Prince Of Persia
Anyone has C++ config for nvim with native lsp (not coc)?
I want to switch from coc to native lsp but I failed
Prince Of Persia
maybe SpaceVim can help you?
What is that exactly?
SMS
https://spacevim.org/ https://spacevim.org/use-vim-as-a-c-cpp-ide/
SMS
https://spacevim.org/use-vim-as-a-java-ide/
Prince Of Persia
Thank you a lot man
SMS
you're welcome :D
Anonymous
Yes, but I did a bit of code, but I think there's nothing wrong at all
you should establish the processing model before coding, clarifying the process
Anonymous
I draw a picture but not allowed to send
Наталья
So what is written, it needs to be done
Наталья
I draw a picture but not allowed to send
You can throw it in the BOS
Kaashᅠ
in my opinion, the file handling is not so important, it's not the core of OOP
Okey thnx,.. I'll be continuing Oops till fully understand
Anonymous
You can throw it in the BOS
sorry what's BOS😂
Anonymous
just a smple essential factors picture
Наталья
Anonymous
can you send me a picture?
Anonymous
I can't find the entry
Anonymous
Okey thnx,.. I'll be continuing Oops till fully understand
yes and I think you can fully understand the oop in work read book is not enough
Anonymous
#include<stdio.h> #include<string.h> int main (){ char str1[]= "dude"; char str2[]="buddy"; strupr(str1); printf("%s", str1); return 0; }
Anonymous
Whats wrong with this code?
Anonymous
Somebody can tell me
Anonymous
?
Anonymous
lost &
Deves
Can any one help me in solving this question please Write a program to implement stack using array Sample testcases Input 1 8 9 7 Output 1 4 5 5
Anonymous
aha?
Anonymous
confusing output
Deves
confusing output
Can you solve it