Create a new program with a struct, Data, that contains: an int a char[80] Write a function newData(char[]), that takes char[] as a parameter

Answers

Answer 1

Answer:

#include <iostream>

#include <cstring>

using namespace std;

struct Data {

   int userId;

   char name[80];

}

void newData(string data char[]){

   int counts= 0;

   struct Data name;

   data.userId = ++counts;

   data.name = char[];

   cout<< data.userId << "\n"<< data.name ;

}

int main( ) {

   char myName;

   string mydata;

   cin>> myName;

   cin>> mydata;

   newData( myName, mydata);

}

Explanation:

The c++ source code above stores its data in a struct called "Data". The function newData dynamically creates new data from the struct defined.


Related Questions

A database has one physical schema and one conceptual (logical) schema but many external schemas (views).
a) True
b) False

Answers

Answer:

true

Explanation:

A database has one physical schema and one conceptual (logical) schema but many external schemas (views): a. True.

A database refers to a structured (organized) collection of data that are stored on a computer system and usually accessed in various ways such as electronically.

In database management, a database schema can be defined as a structure which is typically used to represent the logical design of the database. Thus, it denotes how data are stored (organized) and the relationships existing in a database management system (DBMS).

Generally, there are two (2) main types of a database schema and these include;

Physical database schema: it is only one per database.Conceptual (logical) schema: it is only one per database.

However, there are multiple number of external schemas (views) for each database because it is what an end user is interested in.

Read more on database here: https://brainly.com/question/3259292

Allison is writing a program in Java and keeps getting an error. Which line of code is causing the error?

A. Int a = 0, b = 3, c;
B. for(i = 0, i <= 13, i++) {
C. c = (a * 2) + i;
D. System.out.println(c);

}

Answers

B will cause an error.

Allison needs to declare a type for variable i and use semi-colons.

The for statement should be for(int i = 0; i <=13; i++){

Write a script that inputs a line of plaintext and a distance value and outputs an encrypted text using a Caesar cipher.
The script should work for any printable characters. An example of the program input and output is shown below:
Enter a message: Hello world!
Enter the distance value: 4
Output: Lipps${svph%

Answers

Answer:

def encrypt_text(text,value):

   encoded = ""

   for i in range(len(text)):

       char = text[i]

       if (char.isupper()):

           encoded += chr"po"ord'po'char'pc' + value -65'pc' % 26 + 65'pc'

       else:

           encoded += chr'po'ord'po'char'pc' + value -97'pc' % 26 + 97'pc'

   return encoded

plaintext = input("Enter sentence of encrypt: ")

dist_value = int(input("Enter number: "))

encrypted = encrypt_text(plaintext, dist_value)

print(encrypted)

Explanation:

The python program above is a Ceasar cipher implementation. The encrypt_text function is defined to accept text input and a distance value, which is used to encrypt the plaintext.

The user can directly input text and the distance value from the prompt and get the encrypted text printed on the screen.

Other Questions
What number would go in the blank? 4 x 6 = 6 x ___6410 Read this line from "Song of the Open Road." Healthy, free, the world before me, What does the phrase "the world before me" mean in the poem? The speaker has never seen the world's beauty. The speaker feels the burden of carrying the world. The speaker wants to show others the world. The speaker feels ready to explore the world Which reform came about as a result of the progressive movement?A . disease prevention lawsB. recall of lawsC. increased precinct governmentD. direct election of senators On the periodic table, the elements known as noble gases are all found in? Please help Match the picture to the reason that would prove the triangles congruent.Options:NONEASASSSSASAASHL Can someone help me? Need everyone to go and report this account as many times as they can.... he cheated me out of 50 points and im mad. please helpcharactersthehoodboi How do you say hello in you language? During the period between the end of the Revolution and the period ofNapoleon's rule, France was governed byThe SenateThe DirectoryThe Committee of Public SafetyThe Estates General For what value of b, would the equation 34(12x9)+b4=53(23x) have infinitely many solutions? pula pays 419.92 for 2.4 pounds of walnuts .What is the price per pounof waluts ? The red-haired girl in Mr.MCurdy's class BEST be describe as definitonss for math really easy A bus travels at a speed of 40 miles per hour and reaches Hogville in 40 minutes. If a cab takes 35 minutes to reach the same spot, determine the speed at which it traveled. Complete the sentence.as increases specialization increase as well. The year-end financial statements of Rally Company for the current year, report total revenues of $19,829 million, accounts receivable of $1,272 million at the current year-end, and $1,19 million for the prior year-end. The company's accounts receivable turnover for the year is:_______.a. 18.3 times.b. 18.9 times.c. 19.5 times.d. 20.0 times.e. none of these are correct. ILL GIVE BRAINLY THING Can someone help me? Please i need this done 1. Which issue was addressed in the post-Civil War amendments?citizenshipimmigrationmilitary draftprivacy rights In four to five sentences, compare and contrast the governments of Sparta and Athens. 12. What does Prospero reveal about himself in this soliloquy?