1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
GrogVix [38]
4 years ago
7

How read binary file in c++

Computers and Technology
1 answer:
aivan3 [116]4 years ago
7 0

I don’t get this I’m sry

You might be interested in
Design a kernel module that iterates through all task in the system using the for_each_process() macro. In particular, output th
aleksley [76]

Answer:

#include <linux/kernel.h>

#include <linux/module.h>

#include <linux/init.h>

#include <linux/sched/signal.h>

#include <linux/sched.h>

 

 

struct task_struct *task;        /*    Structure defined in sched.h for tasks/processes    */

struct task_struct *task_child;        /*    Structure needed to iterate through task children    */

struct list_head *list;            /*    Structure needed to iterate through the list in each task->children struct    */

 

int iterate_init(void)                    /*    Init Module    */

{

   printk(KERN_INFO "%s","LOADING MODULE\n");    /*    good practice to log when loading/removing modules    */

     

   for_each_process( task ){            /*    for_each_process() MACRO for iterating through each task in the os located in linux\sched\signal.h    */

       printk(KERN_INFO "\nPARENT PID: %d PROCESS: %s STATE: %ld",task->pid, task->comm, task->state);/*    log parent id/executable name/state    */

       list_for_each(list, &task->children){                        /*    list_for_each MACRO to iterate through task->children    */

 

           task_child = list_entry( list, struct task_struct, sibling );    /*    using list_entry to declare all vars in task_child struct    */

     

           printk(KERN_INFO "\nCHILD OF %s[%d] PID: %d PROCESS: %s STATE: %ld",task->comm, task->pid, /*    log child of and child pid/name/state    */

               task_child->pid, task_child->comm, task_child->state);

       }

       printk("-----------------------------------------------------");    /*for aesthetics*/

   }    

     

 

   return 0;

 

}                /*    End of Init Module    */

     

void cleanup_exit(void)        /*    Exit Module    */

{

 

 

   printk(KERN_INFO "%s","REMOVING MODULE\n");

 

}                /*    End of Exit Module    */

 

module_init(iterate_init);    /*    Load Module MACRO    */

module_exit(cleanup_exit);    /*    Remove Module MACRO    */

 

MODULE_LICENSE("GPL");

MODULE_DESCRIPTION("ITERAT

5 0
3 years ago
Which three are functions of the operating system?
Stels [109]

Answer:

An operating system has three main functions: (1) manage the computer's resources, such as the central processing unit, memory, disk drives, and printers, (2) establish a user interface, and (3) execute and provide services for applications software.

7 0
3 years ago
Read 2 more answers
What is the most important factors to consider when designing a powerpoint presentation?
balandron [24]
It is always helpful to choose a template, and an attractive theme to begin with. Next, display only the keywords or phrases that you need in your PowerPoint. This will help it look less boring (if its a whole paragraph of writing, it looks boring). Lastly, it is important to add visuals or images to your PowerPoint. Google Slides is also very convenient to use. Please message me if you have any other concerns! 
3 0
4 years ago
Read 2 more answers
What happens if a spelling checker doesn't have a suggestion for a misspelled word?
ad-work [718]
The word is most likely correct.
8 0
3 years ago
Read 2 more answers
You are creating a document for your students at school using Words 2013. You are concerned that some of your students have olde
castortr0y [4]
How <span>can you ensure that your students can open up these word files in older versions of word?

The best way to ensure that your students can still open is to make sure and tell them that they should not save their file as '.docx' file but rather a '.doc' file. In that way, the '.doc' file can be opened in any version of Microsoft word.</span>
6 0
3 years ago
Read 2 more answers
Other questions:
  • What will be the output of the following Python code? class A: def test1(self): print(" test of A called ") class B(A): def test
    15·1 answer
  • Write a method swaparrayends() that swaps the first and last elements of its array parameter. ex: sortarray = {10, 20, 30, 40} b
    15·1 answer
  • Chole enjoys her math classes, and she would like to find a career that will allow her to continue use her math skillls which ca
    10·1 answer
  • Assign a variable solveEquation with a function expression that has three parameters (x, y, and z) and returns the result of eva
    6·1 answer
  • Battery maker Duracell introduced a new product called the Duracell Powermat, which is a wireless charging pad for mobile device
    12·1 answer
  • Write a program that takes in an integer in the range 20-98 as input. The output is a countdown starting from the integer, and s
    12·1 answer
  • Jim wants to buy a car, but he’ll probably only need it for a couple of years. He has a short commute to work, so he won’t be pu
    5·1 answer
  • Please write an Introduction on intrusion detection system and prevention system<br> PLEASE
    8·1 answer
  • Russian newspaper says U.S. journalism is conducting 'experiments' to introduce fast-growing artificial intelligence technology.
    9·2 answers
  • From the introductory conversation chip and anna shared, which elements mentioned might suggest the use of case tools?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!