myselfarihantsaini

myselfarihantsaini

Lv10

myselfarihantsainiUniversity of Delhi - DU

1 Follower
0 Following
4 Helped
UPSC aspirant

ANSWERS

Published234

Subjects

Architecture1History29Law4Management1Music1English6Philosophy1Anthropology1Astronomy5Business10Marketing1Science11Electrical Engineering1Mechanical Engineering3Prealgebra2Sociology1Geography9Nursing1Psychology2Communications3Information Technology6Algebra3Engineering6Probability1Computer Science15Accounting3Calculus13Biology16Mathematics3Statistics2Physics7Finance6Economics24Chemistry36
Answer: Here's a breakdown of how you can earn on OneClass: 1. Uploading Notes...
Answer: The correct answer is a, and why the others are incorrect: Acidosis an...
Answer: To find f(theta), we first integrate f''(theta) with respect to theta ...
Answer:the substance that is excreted in urine per day and is almost the same ...
Answer: def largest_odd_number(lst): """ This function finds the largest odd n...
Answer: def create_new_string(string): length = len(string) if length < 3: ...
Answer: def convert_title(string): return string.title()# example usagestring ...
Answer: def convert_case(string): converted_string = "" for char in string: if...
Answer: def count_characters(string): letters = 0 digits = 0 symbols = 0 for c...
Answer: we first need to define two empty lists, lowercase and uppercase. then...
Answer: The two assumptions that must be satisfied for the independent samples...
Answer: def check_condition(num1, num2): if num1 == num2 or abs(num1 - num2) =...
import mathdef calculate_distance(x1, y1, x2, y2): distance = math.sqrt((x2 - ...
Answer: import mathdef calculate_hypotenuse(a, b): c = math.sqrt(a**2 + b**2) ...
Answer: def convert_distance(feet): inches = feet * 12 yards = feet / 3 miles ...
Answer: def sum_of_digits(n): sum = 0 while n > 0: digit = n % 10 sum += di...
Answer: In hypothesis testing, a cutoff t value represents the boundary beyond...
Answer: In this program, the time_to_seconds() the function takes four paramet...
Answer: There are several assays that can be used to check the differentiation...

Can someone please fix my errors in code?

 

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

struct person {
    char name[30];
    char last_name[30];
    int age;
    float wage;
} person1;

struct person {
    char name[30];
    char last_name[30];
    int age;
    float wage;
} person2;

struct person {
    int age;
    float wieght;
    char name[30];
};

typedef struct people {
    char name[30];
    char last_name[30];
    int age;
    float wage;
}person2;

struct pers {
    int age;
    double wieght;
};

int main() {
    //first Example:

    printf("Example 1: \n");
    scrcpt(person1.name, "James Bond");
    person1.age = 55;
    person1.wage = 17.7;

    printf("The name of this person is %s. \n", person1.name);
    printf("The age of this person is %s. \n", person1.age);
    printf("The wage of this person is %s. \n", person1.wage);
    printf("\n \n");
    //---------------------------------------------------------------------------------------------------
    // 2nd Example:
    printf("Example 2: \n");
    person2 student1;
    strcpy(student1.name, "James Bond");
    person1.age = 55;
    person1.wage = 17.7;

    printf("The name of this person is %s. \n", person1.name);
    printf("The age of this person is %s. \n", person1.age);
    printf("The wage of this person is %s. \n", person1.wage);
    printf("\n \n");
    //---------------------------------------------------------------------------------------------------
    // 3rd Example:
    // In this example, we would like to get access for menbers using Pointer
     // 2nd Example:
    printf("Example 3: \n");
    struct pers* personPtr, person11;
    personPtr = &person11;

    printf("Please insert thae age of this person: \n");
    scanf("%d", &personPtr->age);

    printf("Please insert the wieght of this person: \n");
    scanf("%d", &personPtr->wieght);

    printf("The age of this person is %d. \n", personPtr->age);
    printf("The wieght of this person is %s. \n", personPtr->wieght);
    
    
    struct person* ptr;

    int n;
        
    printf("Please, enter the number of the persons that are going to be in this struct: ");
    scanf("&d", &n);

    ptr = (struct persons*)malloc(n * sizeof(struct person));

    for (int i = 0; i < n; i++) {

        printf("Please insert the name followed by age of the person, serperated with a space: ");
        scanf("%s %d", (ptr + i)->age);
    }

    printf("Let's dispaly the inserted names and thier ages: ");

    for (int i = 0; i < n; i++) {
        printf("Name: %s - Age: %d \n", (ptr + i)->name, (ptr + i)->age);
    }

    return 0;
}

Answer: #include <stdio.h>#include <string.h>#include <stdlib.h...
Answer: Differentiation and integration are two fundamental operations in calc...
Answer: Faraday's Law states that the induced electromotive force (EMF) around...
Answer: The embryo sac is formed inside the ovule of a flower through a proces...
Answer: a. The collision depicted here is inelastic, where the two train cars ...
Answer: Isotope iron-59 is used in bone marrow function studies. Iron-59 is a ...
Answer: To calculate the work needed to stretch an H-H bond by 20 pm, we can u...
Answer: The process by which the Sun converts hydrogen to helium is called nuc...
Answer: A black hole is a region of space where the gravitational force is so ...
Answer: A homologous series is a group of chemical compounds that have similar...
Answer: a) Solid to liquid - melting b) Liquid to gas - evaporation or vaporiz...
Answer: Capitalism and communism are two different economic systems that have ...
Answer: As the country director of a multinational company in Ghana, I have de...
Answer: Shake Shack is a fast-casual restaurant chain that specializes in burg...
Answer: Shake Shack is a fast-casual restaurant chain that specializes in burg...
Answer: Aristotle, a Greek philosopher, made a distinction between "natural" a...
Answer: The PAV allele is the original form of a particular gene, and the AVI ...
Answer: a) Silver ingot - Element b) Silver ore - Heterogeneous mixture c) Sil...
Answer: In the reaction: 2K (s) + S (g) --> K2S (s) The oxidation state of ...
Answer: To solve this problem, we will use the ideal gas law: PV = nRT where P...
Answer: The physical state is described as having a fixed shape and the fixed ...

Weekly leaderboard

Start filling in the gaps now
Log in