Forum

                      Welcome to this Knowledge Sharing Platform.

You can POST your idea ,thoughts , views and share with the members connected with this DISCUSSION forum.

You can write your queries in the text area given at the bottom of the page and then press POST. You can also  REPLY to any query raised by others by pressing the REPLY link available adjacent to each query.

You are welcome to connect or ask your doubts through telegram via @yourdoubts

Read Articles

Lights, Camera, AI: Veo2 Revolutionizes Filmmaking

AI Agents – The Future of Software

Responsible AI (RAI) – making AI more reliable and accountable

Is the rise of Generative AI a big threat for an Academic Integrity?

Bitcoin Halving

Published by Expert_Talk

I like sharing article and discussion on emerging technologies. Love to share my knowledge on various latest trends and technologies.

25 thoughts on “Forum

    1. to pass array to function there can be two ways

      1. Just pass array name as function argument (see example1 below)

      2. Pass an adddress of base element to an array (see example2 below)

      Note we also pass an array size to a called function.

      assuming an array declaration
      int arr[10];

      Example 1

      function_name(arr,size)

      Example 2

      function_name (&arr[0],size)

    2. Passing array elements to a function is similar to passing variables to a function.

  1. respected sir how to read database from another file suppose i have book database and i want to acces it in another file so tell me how it is possible………ankit

    1. Dear Ankit

      Lets us first understand that u read only those files in which u have written something (ie the files that contains some data).

      In your case if you have a file named book (book_database).and you want to read data from another file using some reference of this file then both files must contain some common attribute( and that val;ues of this attribute must be unique)

      Ex consider three files – Book , Student and Issue
      Book having attributes(acc_no, title, author,price)
      Student having attribute (Stu_id, name. father_name, course, address, )
      Issue having attribute (acc_no, issue_date, stu_id )

      then to search student name for particular acc_no.
      1 first you find the stu_id for that acc_no using Issue File
      2. Then for that Stu_id you find student name using Student file .

      Hope this will help you to resolve ur problem

      then in this case acc_no is common in both the structure

  2. Write a program to retrieve the student information from file created in previous
    question and print it in following format.

    Roll No. Name Marks

    1. Dear Mohit

      Assuming that your student record is stored in a file named “STUDENT”
      you can use the following code to get the output in desired format

      void Display_Student()
      {
      FILE *fp;
      clrscr();
      printf(“\n\t\tList of Registered Students “);
      fp=fopen(“STUDENT”,”rb+”);
      rewind(fp);
      printf(“\n\n\t ROLL No \t NAME \t MARKS”);
      printf(“\n ———————————————“);
      while(fread(&s1,resize,1,fp)==1)
      {
      printf(“\n\t %d\t %s\t %d”,s1.roll_number,s1.name,s1.marks);
      }
      }

    1. From my understanding, data structure is an organization of data in computer memory. You can choose abstract data type(ADT) based on what kind of operations you want to perform with your data. So we can assume that ADT is a data structure with a set of operations. Standard ADT examples are trees, List, Stacks and etc. And also when choosing data structure we have to pay attention to what is our priority: time or memory.

      I may be wrong, but it is how I understand this concept.

    2. Data Structure is a way to store and organize data so that it can be used efficiently. Data structures are the building blocks of any program. Choosing the appropriate data structure for a program is the most difficult task for a programmer. Data structures have a wide and diverse scope of usage across the fields of Computer Science.

    3. Data structures are the way for organizing, processing, retrieving, and storing data in a computer in an efficient way. For example, in Python, we have four different data collections (arrays): lists, tuples, sets, and dictionaries. So, it means that they each have a particular purpose and we must decide which data type will suit our requirements. If your program needs the data which must not be copied it is better to use the sets instead of lists because in order to delete the copies you must perform extra operations.

    4. I guess it’s all about the way how to organize the received information in terms of your desires, thoughts, and comforts. By knowing data structure, you can easily identify what benefits of different systems of storage and access you can use in real practice. You would definitely know what are the pros and cons of structures of information, and select the one that is appropriate to your hopes and beliefs. Moreover, the importance of correctly selected data structure in various programs might enhance the efficiency and performance of the overall usage of the program, and vice versa, nescience about the details of data structure can lead your program to bags and crashes. That is why data structure is a key component in almost every aspect of programming.

    5. Data structures are the arrangement of memory blocks in the computer main memory to store a collection of data in such a way at performing common and most frequent operations on them becomes easier and efficient.The best way to understand data structures is by having a very good understanding of a very common and in-built data structure found in most languages called Arrays.

    6. As I understood, a data structure is a data organization, management, and storage format that enables efficient access and modification.

  3. In selection sort, if there somehow will be all the same numbers in the list, would it affect on the number of iterations?

  4. Could you explain more about linked list and on limitation with examples?

    1. A linked list is a linear data structure where elements, called nodes, are stored in a non-contiguous manner in memory. Each node contains two parts: data and a reference (or a link) to the next node in the sequence. The last node in the sequence points to null, indicating the end of the list.

      There are several types of linked lists, such as singly linked lists, doubly linked lists, and circular linked lists. However, the basic concept remains the same.

      Advantages of linked lists:

      Dynamic size: Linked lists can easily grow or shrink in size during runtime, unlike arrays.
      Efficient memory allocation: Since linked list nodes are not stored contiguously, they can utilize memory more effectively, especially when dealing with fragmented memory.
      Easy insertion and deletion: Insertion and deletion of nodes in a linked list can be done efficiently, without the need to shift other elements or allocate new memory blocks.
      Limitations of linked lists:

      Random access: Linked lists don’t support random access like arrays do. To access a specific element, you must traverse the list from the head until you reach the desired node, which results in O(n) time complexity.
      Memory overhead: Each node in a linked list requires additional memory to store the reference to the next node, leading to higher memory consumption compared to arrays.
      Reverse traversal: In a singly linked list, reverse traversal is not possible unless you use a variation like a doubly linked list or maintain a separate reference to the previous node.

  5. What will happen if we want to push element to full stack
    Will it ignore our command and goes to next command or return false or stop there

  6. What is the time complexity of deleting all elements in circular queue array implementation?

  7. Logically it can be constant by setting the pointer address to Null but technically it will be size of the queue at any instance…i.e. O (n)

    1. I think to empty a circular queue implemented using array it is enough to make Front and Rear equal to -1. In Linked List I think we loop throught all the queue and dequeue every element. So, in array implementation time complexity is O (1) and in linked list implementation it is O (n). Am I right?

    1. Load Balancer distribute the incoming traffic to mutliple targets. By this way computing resources on the cloud get nearly same processing task/load and each resources will optimally utilized. Moreover, this also reduce the latency and will enhance performance

Leave a reply to U1910045 Atakulov Timur Cancel reply