answersLogoWhite

0

How do you determine class width?

Updated: 12/24/2022
User Avatar

Wiki User

11y ago

Best Answer

Not sure what you mean by class width, but if you mean how do you determine the size of a class, the simplest way is to use the sizeof() operator. The value returned may be equal to or greater than the sum of all its member variables, depending on any adjustments made for memory alignment. If the class contains pointers to memory allocated on the heap, this memory will not be included in the total -- only the size of the pointers to those allocations will be considered.

EDIT: Previous answer does not address the question.

#include<stdio.h>

main()

{

int n,m,i,max;

printf("How many numbers(n) you going to enter:");

scanf("%d",&n);

printf("Enter the numbers:");

scanf("%d",&m);

max=m;

for(i=2;i<=n;i++)

{

scanf("%d",&m);

if(m>max)

max=m;

}

printf("The Largest Number is %d",max);

}

Output:

How many numbers(n) you going to enter:5

Enter the numbers:

25

410

362

5

56

The Largest Number is 410

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you determine class width?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Create a class rectangle The class has attributes length and width each of which is defaults to 1 It has member functions that calculates the perimeter and the area of the rectangle it has set?

public class Rect { private int width, height; public Rect() { width = height = 1; } public Rect(int w, int h) { width = w; height = h; } public int getWidth() { return width; } public int getHeight() { return height; } public void setWidth(int w) { width = w; } public void setHeight(int h) { height = h; } public int getPerimeter() { return 2 * (width + height); } public int getArea() { return width * height; } }


In Java what operator is used to determine if an object is of a particular class type?

The instanceof keyword is used to determine if an object is of a particular class type.Example:Object obj = new String();if(obj instanceof String) {System.out.println("obj is a String!");}


Example of area of rect inheritance program in java?

Let us first define a generic Shape class. This will be an abstract class, since the term "shape" is, itself, very abstract. Let us also assume that this shape is defined in only two dimensions, for the sake of simplicity. abstract class Shape { /* One of the properties of any 2D shape is the area it takes up. Since calculating the area depends on the shape, we'll make this method abstract - all subclasses should implement it differently. */ abstract int getArea(); } Now that we have our base class defined, we can create a rectangle subclass. class Rectangle extends Shape { /* While a rectangle has other properties, we are really only interested in the ones required to calculate the area - width and height. */ int width; int height; /* What's the area of a rectangular shape? area = width x height */ int getArea() { return width*height; } }


Write a program to demonstrate constructor overloading?

Constructor overloading is similar to method overloading. You can overload constructors by changing the parameter list in the class definition. Here is an example public class Box{ private int height; private int width; private int breadth; // First constructor with no parameters Box(){ height = 0; width = 0; breadth = 0; } // This is the second overloaded constructor Box(int h,int w,int b){ height = h; width = w; breadth = h; } public void display(){ System.out.println("Height: "+height+" Width: "+width+" Breadth: "+breadth); } public static void main(String args[]){ Box obj = new Box(1,2,3); obj.display(); } }


How do you determine vkp and rct for class x current transformer given example of 8005a 15va class x ct?

RCT is Secondary resistance of Current transformer it depends on Design.

Related questions

What is the class width of the class interval 4-15?

class width is a width width is a width nothing as class width is a width dont be confuse


How do i determine the number of classes ie intervals estimate the frequency of the class with the least and greatest frequency and determine the class width on a histogram?

try sqrt(N) where N represents the number of observations you have...


Is the any Correlation between class width and student achievement?

There is no correlation between class width and student achievement. Class width is arbitrary (there are rules of thumb for class width, and it depends on the range of the data).


How do you determine the length and width?

measure it


How do you determine area?

length x width


What is the difference between class intervals and class width in statistics?

NONE


Do you know how to determine the length and width of a rectangle?

measure them.


What is the class width of the class interval 15-20?

20-15=5


How do you find the frequency and frequency density on a histogram when you are only given the class width?

To calculate the frequency density we will simply divide the frequency by the class width.


How do you determine the square footage of a house?

First you measure the width and then the lenght then multiply it. length times width.


What is the area of a desk?

You need to know the length and width of the desk before you can determine the area. Multiply the length by the width to get your answer (length x width = area).


What is the distance between consecutive lower class limits called in statistics?

class width