Question Set

1. Which of the following is the correct way of setting values into the structure variable e defined below? struct Emp { public String name; public int age; public Single sal; } Emp e = new Emp();






Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

Show Similar Question And Answers
QA->The present age of Krishnan is twice the age of his son Raju. 10 years ago, krishnan`s age was three times the age of Raju. What is the present age of krishnan?....
QA->Average age of a class of 20 students is 14 years. If the teacher`s age is included, the average age increases by one. What is the age of the teacher?....
QA->Which of the following structure is single at the root of each lung?....
QA->The average age of 17 players is When a new player is included in the squad,the average age became What is the age of the player included....
QA->In a relational database, this is a data structure that organizes the information about a single topic into rows and columns–....
MCQ->Which of the following is the correct way to define a variable of the type struct Emp declared below? struct Emp { private String name; private int age; private Single sal; } Emp e(); e = new Emp(); Emp e = new Emp; Emp e; e = new Emp; Emp e = new Emp(); Emp e;....
MCQ->Which of the following is the correct way of setting values into the structure variable e defined below? struct Emp { public String name; public int age; public Single sal; } Emp e = new Emp();....
MCQ->Which of the following statements correct about the below program? #include<stdio.h> int main() { struct emp { char name[25]; int age; float sal; }; struct emp e[2]; int i=0; for(i=0; i<2; i++) scanf("%s %d %f", e[i].name, &e[i].age, &e[i].sal); for(i=0; i<2; i++) scanf("%s %d %f", e[i].name, e[i].age, e[i].sal); return 0; }....
MCQ->Point out the error in the program? #include<stdio.h> #include<string.h> void modify(struct emp); struct emp { char name[20]; int age; }; int main() { struct emp e = {"Sanjay", 35}; modify(&e); printf("%s %d", e.name, e.age); return 0; } void modify(struct emp p) { p ->age=p->age+2; }....
MCQ->Will the following code work? #include<stdio.h> #include<malloc.h> struct emp { int len; char name[1]; }; int main() { char newname[] = "Rahul"; struct emp p = (struct emp ) malloc(sizeof(struct emp) -1 + strlen(newname)+1); p->len = strlen(newname); strcpy(p -> name, newname); printf("%d %s\n", p->len, p->name); return 0; }....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution