1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
xxTIMURxx [149]
3 years ago
7

write a C program the prints out the size of variables with the following C data types- int, long, unsigned, long long, double,

float, char, and double
Computers and Technology
1 answer:
Anit [1.1K]3 years ago
4 0

<u>C program for finding size of different data types</u>

#include <stdio.h>

//driver function

int main()

{

   int a;  //declaring a of type int

   float b; //declaring b of type float

   double c; //declaring c of type double

   char d; //declaring d of type char

   long e; //declaring e of type long

   long long f; //declaring f of type longlong

   unsigned g; //declaring g of type unsigned

   // Sizeof operator is used to evaluate the size of a variable

printf(" int data type contains: %lu bytes\n",sizeof(a));/*Finding size of int */

printf("float data type contains : %lu bytes\n",sizeof(b));/*Finding size of float */

printf("double data type contains: %lu bytes\n",sizeof(c));/*Finding size of double */

printf("char data type contains: %lu byte\n",sizeof(d));/*Finding size of char */

printf("long data type contains: %lu byte\n",sizeof(e));/*Finding size of long*/ printf("longlong data type contains: %lu byte\n",sizeof(f));/*Finding size of longlong */

printf("unsigned data type contains: %lu byte\n",sizeof(g)); /*Finding size of unsigned */

   return 0;

}

<u>Output</u>

int data type contains: 4 bytes

float data type contains : 4 bytes

double data type contains: 8 bytes

char data type contains: 1 byte

long data type contains: 8 byte

longlong data type contains: 8 byte

unsigned data type contains: 4 byte

You might be interested in
A developer is creating an enhancement to an application that will allow people to be related to their employer. Which data mode
vredina [299]

Answer:

B. Create a lookup relationship to indicate that a person has an employer

Explanation:

Programmers are professional who build computer softwares.

Creating a lookup relationship to indicate that a person has an employer is the data model used to track the data of a developer creating an enhancement to an application that will allow people to be related to their employer. This data model allows for 25people per object.

5 0
4 years ago
What is difference between rand() and srand() ?
gladu [14]

Answer:

rand() function generate the random number within the range.

srand() function decide the starting point for random function or set the seed for rand() function.

Explanation:

rand() function which is used to generate the random number within the range.

srand() function is used to decide the starting point for random function.

In sort meaning, it set the seed for rand() function.

if srand() function not used, the random function generate the same output again and again because the starting point is fixed for generating the random number.

if srand() function used it change the starting point every time and random function generate the output different in every time.

5 0
3 years ago
Varun wants to start his own business. Suggest him at least four functions of an entrepreneur.
Zina [86]

Answer:

<em>●</em><em> </em><em>Creates innovation</em>

<em>●</em><em> </em><em>Takes and makes decision</em>

<em>●</em><em> </em><em>Organizing</em><em> </em><em>resources</em>

<em>●</em><em> </em><em>Takes</em><em> </em><em>and</em><em> </em><em>bears</em><em> </em><em>risks</em>

8 0
4 years ago
Read 2 more answers
Verizon's implementation of a web-based digital dashboard to provide managers with real-time information such as customer compla
elena55 [62]

An example of  improved efficiency is Verizon's use of a Web-based digital dashboard to give management access to real-time data such as customer complaints.

<h3>What does the term " improved efficiency" mean?</h3>
  • Efficiency improvement refers to the improved value and/or quality that a company achieves as a result of changing a service or the manner in which a service is offered.
  • This improvement might be more expensive, but it is worth more in comparison.
  • Being effective in your daily operations can help you raise productivity, boost production output, and get rid of time-consuming administrative activities.
  • It might also imply that you don't need to rely as heavily on costly machinery, unreliable external suppliers, or even temporary workers.

To learn more about improved efficiency, refer to:

brainly.com/question/7690431

#SPJ4

5 0
1 year ago
Is www part of every url address?
melisa1 [442]
The correct answer is that WWW. is universal, meaning that any and all url addresses start and have www.

My reasoning is that if you were to look up, lets say google, do :

www.(google).com ( remove parentheses )

then

google.com 

You come up with the same results THUS YOUR CORRECT ANSWER IS YES! ALL URL ADDRESS HAVE AND CONTAIN WWW.!!!

5 0
4 years ago
Other questions:
  • Can you help please.
    11·1 answer
  • 2. Because technology is always changing, there are new applications being developed constantly. (1 point)
    9·2 answers
  • If, instead, charge 3 is located to the left of charge 1 at a point (on the x axis) that satisfies the conditions given in the p
    7·1 answer
  • What is your favorite food
    11·2 answers
  • What is the output?
    12·1 answer
  • Anyone know how to fix black screen of death on computer​
    6·1 answer
  • The intelligence displayed by humans and other animals is termed?
    15·1 answer
  • Which protocol is responsible for transporting files between a client and a server?
    14·2 answers
  • Consider the following method substringFound, which is intended to return true if a substring, key, is located at a specific ind
    14·1 answer
  • Business Rules constraints falls into two categories:
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!