Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Ask The Science

Ask The Science Logo Ask The Science Logo

Ask The Science Navigation

  • Home
  • Blog
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Blog
  • About Us
  • Contact Us

Share & grow the world's knowledge!

We want to connect the people who have knowledge to the people who need it, to bring together people with different perspectives so they can understand each other better, and to empower everyone to share their knowledge.

Create A New Account
What's your question?
  1. Asked: October 10, 2022In: Computer Science

    List some applications of queue data structure.

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:01 pm

    Applications of the queue are given as follows: Queues are widely used as waiting lists for a single shared resource like a printer, disk, or CPU. Queues are used in the asynchronous transfer of data (where data is not being transferred at the same rate between two processes) for eg. pipes, file IO,Read more

    Applications of the queue are given as follows:

    • Queues are widely used as waiting lists for a single shared resource like a printer, disk, or CPU.
    • Queues are used in the asynchronous transfer of data (where data is not being transferred at the same rate between two processes) for eg. pipes, file IO, and sockets.
    • Queues are used as buffers in most applications like MP3 media players, CD players, etc.
    • Queues are used to maintain the playlist in media players to add and remove the songs from the playlist.
    • Queues are used in operating systems for handling interrupts.
    See less
    • 5
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  2. Asked: September 29, 2022In: Computer Science

    What are the applications of data structures?

    Ask The Science
    Added an answer on September 29, 2022 at 10:35 pm

    Some practical applications of data structures are: Storing data in a tabular form. For example, the contact details of an individual can be stored in arrays. Arrays are widely used in image processing and speech processing. Music players and image sliders use linked lists to switch between items. ARead more

    Some practical applications of data structures are:

    • Storing data in a tabular form. For example, the contact details of an individual can be stored in arrays.
    • Arrays are widely used in image processing and speech processing.
    • Music players and image sliders use linked lists to switch between items.
    • A queue is used for job scheduling – the arrangement of data packets for communication.
    • A tree is used by the decision tree algorithm in machine learning.
    • Technologies like blockchain and cryptography are based on hashing algorithms.
    • Matrices are widely used to represent data and plot graphs, and perform statistical analysis.
    See less
    • 5
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  3. Asked: October 10, 2022In: Computer Science

    Write the C program to insert a node in circular singly list at the beginning.

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:07 pm

    #include<stdio.h> #include<stdlib.h> void beg_insert(int); struct node {     int data;     struct node *next; }; struct node *head; void main () {     int choice,item;     do     {         printf("\nEnter the item which you want to insert?\n");         scanf("%d",&item);         beg_Read more

    1. #include<stdio.h>
    2. #include<stdlib.h>
    3. void beg_insert(int);
    4. struct node
    5. {
    6.     int data;
    7.     struct node *next;
    8. };
    9. struct node *head;
    10. void main ()
    11. {
    12.     int choice,item;
    13.     do
    14.     {
    15.         printf(“nEnter the item which you want to insert?n”);
    16.         scanf(“%d”,&item);
    17.         beg_insert(item);
    18.         printf(“nPress 0 to insert more ?n”);
    19.         scanf(“%d”,&choice);
    20.     }while(choice == 0);
    21. }
    22. void beg_insert(int item)
    23. {
    24.     struct node *ptr = (struct node *)malloc(sizeof(struct node));
    25.     struct node *temp;
    26.     if(ptr == NULL)
    27.     {
    28.         printf(“nOVERFLOW”);
    29.     }
    30.     else
    31.     {
    32.         ptr -> data = item;
    33.         if(head == NULL)
    34.         {
    35.             head = ptr;
    36.             ptr -> next = head;
    37.         }
    38.         else
    39.         {
    40.             temp = head;
    41.             while(temp->next != head)
    42.                 temp = temp->next;
    43.             ptr->next = head;
    44.             temp -> next = ptr;
    45.             head = ptr;
    46.         }
    47.     printf(“nNode Insertedn”);
    48.     }
    49. }

    See less
    • 3
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  4. Asked: September 29, 2022In: Computer Science

    How do you reference all the elements in a one-dimension array?

    Ask The Science
    Added an answer on September 29, 2022 at 11:06 pm

    We can reference all the elements in a one-dimension array using an indexed loop. The counter runs from 0 to the maximum array size, say n, minus one. All elements of the one-dimension array are referenced in sequence by using the loop counter as the array subscript.

    We can reference all the elements in a one-dimension array using an indexed loop. The counter runs from 0 to the maximum array size, say n, minus one. All elements of the one-dimension array are referenced in sequence by using the loop counter as the array subscript.

    See less
    • 3
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  5. Asked: September 29, 2022In: Computer Science

    What is the difference between file structure and storage structure?

    Best Answer
    Ask The Science
    Added an answer on September 29, 2022 at 10:39 pm

    File Structure: A hard disk or external device (such as a USB), stores data that remains intact till manually deleted. Such data representation into secondary or auxiliary memory is called a file structure. Storage Structure: In this type of structure, data (variables, constants, etc.) are stored inRead more

    • File Structure: A hard disk or external device (such as a USB), stores data that remains intact till manually deleted. Such data representation into secondary or auxiliary memory is called a file structure.
    • Storage Structure: In this type of structure, data (variables, constants, etc.) are stored in the main memory, i.e. RAM, and is deleted once the function that uses this data has been completed.
    See less
    • 3
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  6. Asked: October 20, 2022In: Python Interview Questions

    How do you distinguish between NumPy and SciPy?

    Ask The Science
    Added an answer on October 21, 2022 at 12:01 am

    Typically, NumPy contains nothing but the array data type and the most basic operations, such as basic element-wise functions, indexing, reshaping, and sorting. All the numerical code resides in SciPy. As one of NumPy’s most important goals is compatibility, the library tries to retain all featuresRead more

    Typically, NumPy contains nothing but the array data type and the most basic operations, such as basic element-wise functions, indexing, reshaping, and sorting. All the numerical code resides in SciPy.

    As one of NumPy’s most important goals is compatibility, the library tries to retain all features supported by either of its predecessors. Hence, NumPy contains a few linear algebra functions despite the fact that these more appropriately belong to the SciPy library.

    SciPy contains fully-featured versions of the linear algebra modules available to NumPy in addition to several other numerical algorithms.

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  7. Asked: October 10, 2022In: Computer Science

    Write the steps involved in the insertion and deletion of an element in the stack.

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:28 pm

    Push: Increment the variable top so that it can refer to the next memory allocation Copy the item to at the array index value equal to the top Repeat steps 1 and 2 until the stack overflows Pop: Store the topmost element into the another variable Decrement the value of the top Return the topmost eleRead more

    Push:

    • Increment the variable top so that it can refer to the next memory allocation
    • Copy the item to at the array index value equal to the top
    • Repeat steps 1 and 2 until the stack overflows

    Pop:

    • Store the topmost element into the another variable
    • Decrement the value of the top
    • Return the topmost element
    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  8. Asked: October 10, 2022In: Computer Science

    What is a postfix expression?

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:27 pm

    An expression in which operators follow the operands is known as postfix expression. The main benefit of this form is that there is no need to group sub-expressions in parentheses or to consider operator precedence. The expression "a + b" will be represented as "ab+" in postfix notation.

    An expression in which operators follow the operands is known as postfix expression. The main benefit of this form is that there is no need to group sub-expressions in parentheses or to consider operator precedence.

    The expression “a + b” will be represented as “ab+” in postfix notation.

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  9. Asked: October 10, 2022In: Computer Science

    How to reference all the elements in a one-dimension array?

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:25 pm

    It can be done by using an indexed loop such that the counter runs from 0 to the array size minus one. In this manner, you can reference all the elements in sequence by using the loop counter as the array subscript.

    It can be done by using an indexed loop such that the counter runs from 0 to the array size minus one. In this manner, you can reference all the elements in sequence by using the loop counter as the array subscript.

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  10. Asked: October 10, 2022In: Computer Science

    How are the elements of a 2D array are stored in the memory?

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:24 pm

    There are two techniques by using which, the elements of a 2D array can be stored in the memory. Row-Major Order: In row-major ordering, all the rows of the 2D array are stored in the memory contiguously. First, the 1st row of the array is stored in the memory completely, then the 2nd row of the arrRead more

    There are two techniques by using which, the elements of a 2D array can be stored in the memory.

    • Row-Major Order: In row-major ordering, all the rows of the 2D array are stored in the memory contiguously. First, the 1st row of the array is stored in the memory completely, then the 2nd row of the array is stored in the memory completely, and so on till the last row.
    • Column-Major Order: In column-major ordering, all the columns of the 2D array are stored in the memory contiguously. first, the 1st column of the array is stored in the memory completely, then the 2nd row of the array is stored in the memory completely, and so on till the last column of the array.
    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  11. Asked: October 10, 2022In: Computer Science

    Calculate the address of a random element present in a 2D array, given base address as BA.

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:22 pm

    Row-Major Order: If the array is declared as a[m][n] where m is the number of rows while n is the number of columns, then the address of an element a[i][j] of the array stored in row-major order is calculated as,   Address(a[i][j]) = B. A. + (i * n + j) * size Column-Major Order: If the array iRead more

    Row-Major Order: If the array is declared as a[m][n] where m is the number of rows while n is the number of columns, then the address of an element a[i][j] of the array stored in row-major order is calculated as,

     

    Address(a[i][j]) = B. A. + (i * n + j) * size

    Column-Major Order: If the array is declared as a[m][n] where m is the number of rows while n is the number of columns, then the address of an element a[i][j] of the array stored in column-major order is calculated as

    Address(a[i][j]) = ((j*m)+i)*Size + BA.

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  12. Asked: October 10, 2022In: Computer Science

    If you are using C language to implement the heterogeneous linked list, what pointer type should be used?

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:09 pm

    The heterogeneous linked list contains different data types, so it is not possible to use ordinary pointers for this. For this purpose, you have to use a generic pointer type like void pointer because the void pointer is capable of storing a pointer to any type.

    The heterogeneous linked list contains different data types, so it is not possible to use ordinary pointers for this. For this purpose, you have to use a generic pointer type like void pointer because the void pointer is capable of storing a pointer to any type.

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  13. Asked: May 10, 2022In: Electrical and Electronics Engineering

    Charging supercapacitors with reversed polarity

    Best Answer
    Ask The Science
    Added an answer on May 10, 2022 at 4:25 pm

    Electrolytic capacitor polarization is initially set at the factory by applying voltage to form the insulating oxide layer. That is why caps have a polarity and these standard supercaps are no different. Reversing the polarity will damage the original insulating layer first and then start to form aRead more

    Electrolytic capacitor polarization is initially set at the factory by applying voltage to form the insulating oxide layer.

    That is why caps have a polarity and these standard supercaps are no different. Reversing the polarity will damage the original insulating layer first and then start to form a new insulating layer with the applied polarity. It is not something that should be allowed to happen, so consider the capacitors damaged, or at least degraded, and they could be unstable and dangerous too.

    Here is also what manufacturer says about reversing the polarity:

    https://maxwell.com/wp-content/uploads/2021/08/Notes_on_Using_Ultracapacitor_Cells.pdf

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  14. Asked: December 26, 2022In: Computer Science

    What is the difference between von Neumann architecture and Harvard architecture

    Best Answer
    KSR
    Added an answer on December 26, 2022 at 5:38 pm

    VON NEUMANN ARCHITECTURE It is an ancient computer architecture based on the stored program computer concept. The same physical memory address is used for instructions and data. There is a common bus for data and instruction transfer. Two clock cycles are required to execute a single instruction. ItRead more

    VON NEUMANN ARCHITECTURE

    • It is an ancient computer architecture based on the stored program computer concept.
    • The same physical memory address is used for instructions and data.
    • There is a common bus for data and instruction transfer.
    • Two clock cycles are required to execute a single instruction.
    • It is cheaper.
    • CPU can not access instructions and read/write at the same time.
    • It is used in personal computers and small computers.

    HARVARD ARCHITECTURE

    • It is a modern computer architecture based on Harvard Mark I relay-based model.
    • A separate physical memory address is used for instructions and data.
    • Separate buses are used for transferring data and instruction.
    • An instruction is executed in a single cycle.
    • It is more costly than Von Neumann’s Architecture.
    • CPU can access instructions and read/write at the same time.
    • It is used in microcontrollers and signal processing.
    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  15. Asked: December 18, 2022In: SQL Interview Questions

    If a table contains duplicate rows, will a query display duplicate values by default? How can you eliminate duplicate rows from a query result?

    Best Answer
    Ask The Science
    Added an answer on December 18, 2022 at 1:05 am

    Yes, they will be displayed by default. To eliminate duplicate records, you use the DISTINCT keyword after the word SELECT.

    Yes, they will be displayed by default. To eliminate duplicate records, you use the DISTINCT keyword after the word SELECT.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  16. Asked: December 18, 2022In: SQL Interview Questions

    What is a synonym?

    Best Answer
    Ask The Science
    Added an answer on December 18, 2022 at 1:04 am

    A synonym is a database object that allows you to create a kind of “link” or “alias” to another database object. This is often done to hide the name of the actual object for security reasons or to improve the maintenance of the code in the future.

    A synonym is a database object that allows you to create a kind of “link” or “alias” to another database object. This is often done to hide the name of the actual object for security reasons or to improve the maintenance of the code in the future.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  17. Asked: December 18, 2022In: SQL Interview Questions

    What is a unique constraint? How is it different from a primary key?

    Best Answer
    Ask The Science
    Added an answer on December 18, 2022 at 1:02 am

    A unique constraint is a constraint on a table that says that a column or set of columns needs to have unique values. It’s different from a primary key in that a table can only have one primary key, but a table can have zero, one, or many unique constraints. Unique constraints can also allow NULL vaRead more

    A unique constraint is a constraint on a table that says that a column or set of columns needs to have unique values.

    It’s different from a primary key in that a table can only have one primary key, but a table can have zero, one, or many unique constraints.

    Unique constraints can also allow NULL values, but primary keys cannot.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  18. Asked: December 18, 2022In: SQL Interview Questions

    What’s the difference between a view and a materialized view?

    Best Answer
    Ask The Science
    Added an answer on December 18, 2022 at 12:44 am

    A view is simply an SQL query that is stored on the database, without the results. Every time a view is queried, this definition of the view’s query is run. If the underlying tables have been updated, the view will load these results. A materialized view is a query where the results have been storedRead more

    A view is simply an SQL query that is stored on the database, without the results. Every time a view is queried, this definition of the view’s query is run. If the underlying tables have been updated, the view will load these results.

    A materialized view is a query where the results have been stored in a permanent state, like a table. If the underlying tables are updated, then by default, the materialized views are not updated.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  19. Asked: November 21, 2022In: Data Engineer Interview Questions

    Which two messages does NameNode get from DataNode?

    Best Answer
    Ask The Science
    Added an answer on November 21, 2022 at 11:52 pm

    DataNodes provide NameNodes with information about the data in the form of messages or signals. The two indicators are: Block report signals, which is a list of the data blocks stored on the DataNode and an explanation of how they operate. DataNode's heartbeat, which indicates it’s active and workinRead more

    DataNodes provide NameNodes with information about the data in the form of messages or signals.

    The two indicators are:

    • Block report signals, which is a list of the data blocks stored on the DataNode and an explanation of how they operate.
    • DataNode’s heartbeat, which indicates it’s active and working. A recurring report helps decide whether to employ NameNode. If this signal is not sent, DataNode’s operation has apparently ceased.
    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  20. Asked: November 21, 2022In: Data Engineer Interview Questions

    Describe the HDFS Safe mode.

    Best Answer
    Ask The Science
    Added an answer on November 21, 2022 at 11:45 pm

    In a cluster, NameNode operates in read-only mode, while NameNode starts out in Safe Mode. Safe Mode inhibits writing to the file system. At this point, it gathers information and statistics from each DataNode.

    In a cluster, NameNode operates in read-only mode, while NameNode starts out in Safe Mode. Safe Mode inhibits writing to the file system. At this point, it gathers information and statistics from each DataNode.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  21. Asked: October 20, 2022In: Python Interview Questions

    How is a file deleted in Python?

    Ask The Science
    Added an answer on October 21, 2022 at 12:06 am

    The file can be deleted by either of these commands: os.remove(filename) os.unlink(filename)

    The file can be deleted by either of these commands:

    os.remove(filename)
    os.unlink(filename)

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  22. Asked: October 20, 2022In: Python Interview Questions

    Describe multithreading in Python.

    Ask The Science
    Added an answer on October 21, 2022 at 12:03 am

    Using Multithreading to speed up the code is not the go-to option, even though Python comes with a multi-threading package. The package has the GIL or Global Interpreter Lock, which is a construct. It ensures that only one of the threads executes at any given time. A thread acquires the GIL and perfRead more

    Using Multithreading to speed up the code is not the go-to option, even though Python comes with a multi-threading package.

    The package has the GIL or Global Interpreter Lock, which is a construct. It ensures that only one of the threads executes at any given time. A thread acquires the GIL and performs work before passing it to the next thread.

    This happens so fast that to a user it seems that threads are executing in parallel. Obviously, this is not the case as they are just taking turns while using the same CPU core. GIL passing adds to the overall overhead of the execution.

    As such, if you intend to use the threading package for speeding up the execution, using the package is not recommended.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  23. Asked: October 20, 2022In: Python Interview Questions

    What is the difference between deep copy and shallow copy?

    Ask The Science
    Added an answer on October 21, 2022 at 12:01 am

    We use a shallow copy when a new instance type gets created. It keeps the values that are copied in the new instance. Just like it copies the values, the shallow copy also copies the reference pointers. Reference points copied in the shallow copy reference to the original objects. Any changes made iRead more

    We use a shallow copy when a new instance type gets created. It keeps the values that are copied in the new instance. Just like it copies the values, the shallow copy also copies the reference pointers.

    Reference points copied in the shallow copy reference to the original objects. Any changes made in any member of the class affect the original copy of the same. Shallow copy enables faster execution of the program.

    Deep copy is used for storing values that are already copied. Unlike shallow copy, it doesn’t copy the reference pointers to the objects. Deep copy makes the reference to an object in addition to storing the new object that is pointed by some other object.

    Changes made to the original copy will not affect any other copy that makes use of the referenced or stored object. Contrary to the shallow copy, deep copy makes the execution of a program slower. This is due to the fact that it makes some copies for each object that is called.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  24. Asked: October 10, 2022In: Computer Science

    Write the postfix form of the expression: (A + B) * (C – D)

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:26 pm

    AB+CD-*

    AB+CD-*

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  25. Asked: October 10, 2022In: Computer Science

    Are linked lists considered linear or non-linear data structures?

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:21 pm

    A linked list is considered both linear and non-linear data structure depending upon the situation. Based on data storage, it is considered a non-linear data structure. Based on the access strategy, it is considered a linear data structure.

    A linked list is considered both linear and non-linear data structure depending upon the situation.

    • Based on data storage, it is considered a non-linear data structure.
    • Based on the access strategy, it is considered a linear data structure.
    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  26. Asked: October 10, 2022In: Computer Science

    What are the advantages of Linked List over an array?

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:13 pm

    The size of a linked list can be incremented at runtime which is impossible in the case of the array. The List is not required to be contiguously present in the main memory, if the contiguous space is not available, the nodes can be stored anywhere in the memory connected through the links. The ListRead more

    • The size of a linked list can be incremented at runtime which is impossible in the case of the array.
    • The List is not required to be contiguously present in the main memory, if the contiguous space is not available, the nodes can be stored anywhere in the memory connected through the links.
    • The List is dynamically stored in the main memory and grows as per the program demand while the array is statically stored in the main memory, the size of which must be declared at compile time.
    • The number of elements in the linked list is limited to the available memory space while the number of elements in the array is limited to the size of an array.
    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  27. Asked: October 10, 2022In: Computer Science

    Write the syntax in C to create a node in the singly linked list.

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:11 pm

    struct node { int data; struct node *next; }; struct node *head, *ptr; ptr = (struct node *)malloc(sizeof(struct node));

    struct node
    {
    int data;
    struct node *next;
    };
    struct node *head, *ptr;
    ptr = (struct node *)malloc(sizeof(struct node));

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  28. Asked: October 10, 2022In: Computer Science

    Define the queue data structure.

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 4:04 pm

    A queue can be defined as an ordered list that enables insert operations to be performed at one end called REAR and delete operations to be performed at another end called FRONT.

    A queue can be defined as an ordered list that enables insert operations to be performed at one end called REAR and delete operations to be performed at another end called FRONT.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  29. Asked: October 10, 2022In: Computer Science

    List the area of applications where stack data structure can be used?

    Best Answer
    Ask The Science
    Added an answer on October 10, 2022 at 3:59 pm

    Expression evaluation Backtracking Memory Management Function calling and return

    • Expression evaluation
    • Backtracking
    • Memory Management
    • Function calling and return
    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  30. Asked: September 29, 2022In: Computer Science

    What are FIFO and LIFO?

    Ask The Science
    Added an answer on September 29, 2022 at 11:08 pm

    Both FIFO and LIFO are approaches to accessing, storing and retrieving elements from a data structure. LIFO stands for Last In First Out. In this approach, the most recently stored data is the one to be extracted first. FIFO stands for First In First Out. With this approach, the data that is storedRead more

    Both FIFO and LIFO are approaches to accessing, storing and retrieving elements from a data structure. LIFO stands for Last In First Out. In this approach, the most recently stored data is the one to be extracted first.

    FIFO stands for First In First Out. With this approach, the data that is stored earliest will be extracted first.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp

Sidebar

Ask A Question
  • Popular
  • Answers
  • BigB

    Why do we not fall off from the Earth?

    • 2 Answers
  • KSR

    What is the difference between von Neumann architecture and Harvard ...

    • 1 Answer
  • BigB

    What is the external structure of the Earth?

    • 1 Answer
  • BigB

    What is the internal structure of the Earth?

    • 1 Answer
  • BigB

    How do we discover what is inside the Earth?

    • 1 Answer
  • KSR
    KSR added an answer VON NEUMANN ARCHITECTURE It is an ancient computer architecture based… December 26, 2022 at 5:38 pm
  • Ask The Science
    Ask The Science added an answer Yes, they will be displayed by default. To eliminate duplicate… December 18, 2022 at 1:05 am
  • Ask The Science
    Ask The Science added an answer A synonym is a database object that allows you to… December 18, 2022 at 1:04 am
  • Ask The Science
    Ask The Science added an answer A unique constraint is a constraint on a table that… December 18, 2022 at 1:02 am
  • Ask The Science
    Ask The Science added an answer A surrogate key is a field in a table that… December 18, 2022 at 1:01 am

Trending Tags

advantages of linked list circular singly list c program data engineer interview questions data structure data structure interview questions data structure interview questions and answers data structures front end front end interview questions heterogeneous linked list interview questions linked list linked lists python python interview questions queue queue data structure software testing interview questions sql interview questions syntax

Explore

  • Recent Questions
  • Most Answered
  • Answers
  • No Answers
  • Most Visited
  • Most Voted
  • Random

Footer

Ask the Science

Ask the Science is a Science questions & Answers Engine which will help you establish your community and connect with other people.

Legal

  • Privacy Policy
  • Terms and Conditions

About Us

  • About Us
  • Blog
  • Contact Us

© 2022, All Rights Reserved
With Love by Ask The Science.