Answer:
See the lseek_example.c file. Modify the lseek_example.c, such that it reads from an input file (named "start.txt") and will print to an output file (named "end.txt") every (1+3*i)th character, starting from the 1st character in the input file. In other words, it will print the 1st character, then skip 2 characters and print the 4th one, then skip 2 characters and print the 7th one, and so on.
For instance, for input file:
ABCDEFGHIJKLM
It will output:
ADGJM
Iseek_example.c file contant:
// C program to read nth byte of a file and
// copy it to another file using lseek
#include
#include
#include
#include
void func(char arr[], int n)
{
// Open the file for READ only.
int f_read = open("start.txt", O_RDONLY);
// Open the file for WRITE and READ only.
int f_write = open("end.txt", O_WRONLY);
int count = 0;
while (read(f_read, arr, 1))
{
// to write the 1st byte of the input file in
// the output file
if (count < n)
{
// SEEK_CUR specifies that
// the offset provided is relative to the
// current file position
lseek (f_read, n, SEEK_CUR);
write (f_write, arr, 1);
count = n;
}
// After the nth byte (now taking the alternate
// nth byte)
else
{
count = (2*n);
lseek(f_read, count, SEEK_CUR);
write(f_write, arr, 1);
}
}
close(f_write);
close(f_read);
}
// Driver code
int main()
{
char arr[100];
int n;
n = 5;
// Calling for the function
func(arr, n);
return 0;
}
Explanation:
((PLEASE HELP ME)) i need to get all my school work done before thursday
------------- are used to navigate between pages and Web sites.
Question 1 options:
Transitions
Animations
Hyperlinks
None of the above
Answer:
none of the above
Explanation:
Web navigation refers to the process of navigating a network of information resources in the World Wide Web, which is organized as hypertext or hypermedia. The user interface that is used to do so is called a web browser.
A video game character can face toward one of four directions: north, south, east, and west. Each direction is stored in memory as a sequence of four bits. A new version of the game is created in which the character can face toward one of eight directions, adding northwest, northeast, southwest, and southeast to the original four possibilities. Which of the following statements is true about how the eight directions must be stored in memory?
A. Four bits are not enough to store the eight directions. Five bits are needed for the new version of the game.
B. Four bits are enough to store the eight directions
C. Four bits are not enough to store the eight directions. Sodeen bits are needed for the new version of the game.
D. Four bits are not enough to store the eight directions. Eight bits are needed for the new version of the game.
Answer:
B. Four bits are enough to store the eight directions
Explanation:
The summary of the question is to determine whether 4 bits can store 8 directions or not.
To understand this question properly, the 8 bits will be seen as 8 different characters.
In computer memory, a computer of n bits can store 2^n characters.
In this case:
[tex]n = 4[/tex] i.e. 4 bits
So:
[tex]2^n = 2^4[/tex]
[tex]2^n = 16[/tex]
This implies that the memory can store up to 16 characters.
Because 16 > 8, then (b) answers the question.
Your co-worker who went to UCLA tells you that DHCP is not enabled at your new job, so you should just use the same IP address that you have at home to connect to the internet. He told you it should work because your computer is communicating with a unique public IP address at home, so no other computer in the world would have it. When you try this, your computer does not have internet access. Give two reasons why?
Answer:
1. internet connection is not enabled on the computer.
2. The DHCP server in the company is not enabled as well.
Explanation:
For a user to access the internet, the computer must have a public IP address that is either assigned to it by a service provider or dynamically from the DHCP server in the computer. In the case of the former, the user just needs to enable the internet connection to obtain the unique IP address.
If the DHCP server or the internet connection is not enabled, the user would not have access to the internet.
how can we achieve an effective communication with other people
Consider any tasks performed in real life, for example, driving a taxi. The task you pick involves many functions. Driving a taxi involves picking up customers, and quickly and safely transporting them to their destination. Go through the components of the AI cycle to automate the problem you choose. List the useful precepts available. Describe how you will represent your knowledge. Based on that, describe how you will use reasoning to make and execute a plan expected to achieve a goal or obtain maximum utility. (this is for artificial intelligence, but they did not have that option)
Which statement about the Weather Bar in the Outlook calendar is true?
A.It displays weather for the current location for five days.
B.It does not require an internet connection to update.
C.Additional cities can be added for travel needs.
D.It sends pop-up alerts about severe weather.
Answer:
C
Explanation:
Fyroff consultants, a leading software consulting firm in the United States, decides to launch an Enterprise Resource Planning (ERP) solution. The company chooses the brand name Fyroff Enterprise for the new solution. However, when the company attempts to register the domain name, it finds that a small unknown firm is already registered under the same domain name. The small firm is now attempting to sell the domain name to Fyroff. Which of the following terms refers to this practice of buying a domain name only to sell it for big bucks?
a. cybersquatting
b. logic bombing
c. cyberbullying
d. bot herding
e. cyberstalking
Answer:
The correct answer is a. cybersquatting
Explanation:
Cybersquatting is the registration of a domain name that corresponds to the denomination of a brand or name, with the main objective of obtaining some economic benefit from its sale to the owner and legitimate owner of the brand. Cybersquatting can range from making money by parking domains (buying names that are then "parked", that is, left unused but generating advertising revenue based on the visits they receive) to redirecting users to another website In order for it to get more traffic, that is, with cybersquatting it is generally intended to sell the registered domain names to the legitimate owners or interested parties, at a price well above the cost of registration or also to use the domain taking advantage of the recognition associated with the legitimate owner to obtain commercial advantages, as clients in the network.
Which option in a Task element within Outlook indicates that the task is scheduled and will be completed on a later
date?
O Waiting on someone else
O In Progress
O Not started
O Deferred
Answer: D: Deferred
Explanation:
took test
NO LINKS OR I WILL DELETE YOUR FORTNITE ACCOUNT
What can you do with the free version of the splice editor
Answer:
can i have ur fortnite account if u hav one and dont use it :) i only say that cuz u mentioned fortnite
Explanation:
with the free version you can add effects (cheap effects) cut the video, crop some parts. and posting leaves a watermark until u buy money
Answer:
It has a 7 day free trial while your using the free version
Explanation:
Under which menu option of a word processing program does a star appear?
A star appears under the
menu of the word processing program.
Answer:
shapes
Explanation:
Plato got it correctly
please help me faster plzzz
correct plzz
Answer:
a. A numeric keypad.
b. An interpreter.
c. A 3D printer.
d. A speaker.
Explanation:
An output device can be defined as a hardware device that typically receives processed data from the central processing unit (CPU) and converts these data into information that can be used by the end user of a computer system.
Also, an input device can be defined as any device that is typically used for sending data to a computer system.
Generally, all of the output and input device of a computer are known as peripheral (external) devices and they provide data (informations) to the end users in various formats such as video, audio, texts, images etc.
Since output and input devices are peripheral (external) devices, they can be connected to the computer system wirelessly or through a wired-connection (cable).
Some examples of peripheral (external) devices are monitor, speakers, keyboard, printer, mouse, scanner, projector etc.
Basically, the three (3) key element of a computer system are: a set of memory modules, processor and a set of input-output (I/O) modules. Each of the input-output (I/O) module interfaces to the central switch or system bus and are used to control one or more peripheral (external) devices.
a. A numeric keypad is a device used to input a PIN. It comprises of numbers ranging from 0 to 9.
b. An interpreter analyses and executes a program line by line.
c. A 3D printer produces output in the form of solid objects. It is typically used for inscribing or printing textual informations or graphic images on an object in three dimensions.
d. A speaker produces output in the form of sound. It is an electronic device that converts electrical signals into sound energy (waves).