An operator is a symbol that tells the computer to perform certain mathematical or logical manipulation on data stored in variables. The variables that are operated are termed as operands.
C operators can be classified into a number of categories. They include:
1. Arithmetic operators
2. Relational operators
3. Logical operators
4. Assignment operator
5. Increment and decrement operators
6. Conditional operator
7. Bitwise operators
8. Special operators
Now, let us discuss each category in detail.
what are loop in general
what is loop in c language
uses of loop in c language
types of loop in c language
program of loop in c language
syantax of loop in c language
what are loop in general
what is loop in c language
uses of loop in c language
types of loop in c language
program of loop in c language
syantax of loop in c language
C Programming/Strings. A string in C is merely an array of characters. The length of a string is determined by a terminating null character: '-' . So, a string with the contents, say, "abc" has four characters: 'a' , 'b' , 'c' , and the terminating null character.
Hello there, this powerpoint presentation is made by Ansh kashyap(me) the topic of this presentation is "Data types in C".
Data types used in C language refer to an extensive system that we use to declare various types of functions or variables in a program. Here, on the basis of the type of variable present in a program, we determine the space that it occupies in storage, along with the way in which the stored bit pattern will be interpreted.
A data type specifies the type of data that a variable can store such as integer, floating, character, etc.
C Programming : Arrays, One Dimensional Arrays, Two Dimensional Arrays, Three Dimensional Arrays, Operations on Arrays like Insertion, Deletion, Searching, Sorting, Merging, Traversing, Matrix Manipulation like Addition, Multiplication etc. : Visit us at : www.rozyph.com
C Programming/Strings. A string in C is merely an array of characters. The length of a string is determined by a terminating null character: '-' . So, a string with the contents, say, "abc" has four characters: 'a' , 'b' , 'c' , and the terminating null character.
Hello there, this powerpoint presentation is made by Ansh kashyap(me) the topic of this presentation is "Data types in C".
Data types used in C language refer to an extensive system that we use to declare various types of functions or variables in a program. Here, on the basis of the type of variable present in a program, we determine the space that it occupies in storage, along with the way in which the stored bit pattern will be interpreted.
A data type specifies the type of data that a variable can store such as integer, floating, character, etc.
C Programming : Arrays, One Dimensional Arrays, Two Dimensional Arrays, Three Dimensional Arrays, Operations on Arrays like Insertion, Deletion, Searching, Sorting, Merging, Traversing, Matrix Manipulation like Addition, Multiplication etc. : Visit us at : www.rozyph.com
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations.
C language supports a rich set of built-in operators. An operator is a symbol that tells the compiler to perform certain mathematical or logical manipulations. Operators are used in program to manipulate data and variables.
Probably not be able to get a better understanding of the most important thing is that I have to go to the hospital and the other is a great way to get the best out of the office and I am not sure if I can get a chance to get the best out of the office and I am not sure if I can get a chance to get the best out of the office and I am not sure if I
This slide contains information about Operators in C.pptxranaashutosh531pvt
This slide contains information about c++ operators,This slide contains information about This slide contains information about c++ operators,This slide contains information about c++ operators,This slide contains information about c++ operators,This slide contains information about c++ operators,
C++ provides operators for composing arithmetic, relational, logical, bitwise, and conditional expressions. It also provides operators which produce useful side-effects, such as assignment, increment, and decrement. We will look at each category of operators in turn. We will also discuss the precedence rules which govern the order of operator evaluation in a multi-operator expression.
HTML stands for Hyper Text Markup Language, which is the most widely used language on Web to develop web pages. and dummies guide to html5 and complete html guide pdf
Ransomware is a type of malicious software that blocks access to data or threatens to publish it until a ransom is paid. Simple ransomware may lock the system in a way which is not difficult for a knowledgeable person to reverse. More advanced malware uses a technique called cryptoviral extortion, in which it encrypts the victim's files, making them inaccessible, and demands a ransom payment to decrypt them and ransomware attacks 2017
How to write a Great Research Paper?
The research paper is a significant piece of academic writing, in which the author performs research on a topic independently and writes a description of the results of that research. It is written to communicate to the community and to contribute to the advancement of knowledge. Types of papers include:
• Inventions
• Progress
• Survey
https://www.ThesisScientist.com
Research process involves a systematic way that focuses on being objective and gathering a multitude of information for analysis so that the researcher can come to a conclusion. Basic steps that should be considered and research process definition pdf and marketing research process 5 steps
How to write a good Dissertation/ Thesis
Thesis refers to a written work on a particular domain resulting from original research. You should introduce your subject area and explain research topic by referring latest published materials instead of old published materials. The objective is to present a simple, clear and complete account of the results of your research.
• Brainstorm or generate ideas for your topic.
• Conduct a thorough literature search before designing your methodology and collecting your data.
Relate your findings to your original statement of the problem and your literature review.
Https://www.ThesisScientist.com
How to write a research paper: How to write a research paper?
The research paper can be considered as the living thing which grows and changes as the student explores, interprets and evaluates sources related to a specific topic. Steps to write a research paper:
• Choose your topic.
• Begin your search.
• Making an outline.
• Write your paper.
A computer user can be tricked or forced into downloading software onto a computer that is of malicious intent. Such software comes in many forms, such as viruses, Trojan horses, spyware, and worms.and internet security tips and tricks
But as we’re stuck with the word ‘teenager’, what do we do? We could use it in a non-judgemental way just to mean those aged 13-19. Or, better still, we could ditch it altogether and take people for what they are, not how they’re labeled.Case Study: I left school at 18 and worked as a teacher. I dressed like a teacher, behaved like a teacher and, as far as I can remember, even thought like a teacher. and how to deal with a lying teenager
driverless car 2020 is a vehicle that is capable of sensing its environment and navigating without human input.[4] Many such vehicles are being developed, but as of May 2017 automated cars permitted on public roads are not yet fully autonomous and driverless car google
the podcast is an episodic series of digital audio files which a user can subscribe to so that new episodes are automatically downloaded via web syndication to the user's own local computer, mobile application, or portable media player.[1] and podcast tips beginners and podcast speaking tips
The science of vastu is related to the branch vedic truth which is very important for creating a natural balance in the life of human beings. Vastu not only helps in your personal growth but also helps in creating a prosperous environment all around you. Every person wants to enhance their career opportunities in order to gain excellent benefits in future. Vastu is science that helps you in many ways, it makes your house and the surroundings around you completely positive, and this in turn helps in improving your career objectives to a great extent. According to the Vastu principles, every person should follow certain rules and regulations in their study and working norm.
Reliance Jio Infocomm Limited, or Jio, is a LTE mobile network operator in India. It is a wholly owned subsidiary of Reliance Industries headquartered in Navi Mumbai, Maharashtra that provides wireless 4G LTE service network (without 2G/3G based services) and is the only 'VoLTE-only' (Voice over LTE) operator in the country which lacks legacy network support of 2G and 3G and reliance jio business model
The relationship between how satisfied a person is with their job and their actual job performance is open to discussion and debate. You see, it's hard to correlate those two aspects primarily. and job satisfaction and performance ande job satisfaction factors
Where should you put your advertising when there a limited number of dollars available? It’s the number one question of business owners as they consider all things marketing. Every media salesperson is going to tell you that you should advertise with them and mistakes in advertising
The very first step towards aiming to become a contributor on top platforms is to build your own brand and online presence.Bigger websites continually require valuable pieces of content to feed the insatiable quest of their audiences; however, they wouldn’t just take on any piece of content or contributor who they aren’t able to trust and verify. and contributor and non contributor
This thesis presents a simulation based analysis of these protocols. We used the combination of EIGRP&IS-IS, RIP&IS-IS routing protocols on the Hybrid network in order to reveal the advantage of one over the other as well as the robustness of each protocol combination and how this is measured.
Dynamic source routing protocol (DSR) is an on-demand protocol designed to restrict the bandwidth consumed by control packets in ad hoc wireless networks by eliminating the periodic table update messages required in the table-driven approach.ad hoc network protocols
Delivering high-quality video content is one of the latest and most demanding challenges faced by the IP. With the deployment of these new IPTV services, the existing network infrastructures will be pushed to their limits. To accommodate the needs of IPTV services, networks must be able to scale to millions of customers and how to setup iptv
Fog computing factory in alliance nearly bovine computing, optimizing the use of this resource. Currently, crush exercise matter is abeyance to the backward, stored and analyzed, limitation which a decision is made and action taken. But this practices isn’t efficient. Utter computing allows computing, honest and action-taking to enter into the picture near IoT belongings and only pushes relevant matter to the cloud. “Fuzz distributes not at all bad quick-wittedness near at the service better accordingly we nub run this torrent of observations,” explains Baker. “So we thus adjustment it newcomer disabuse of uphold data into unalloyed hint go wool-gathering has favour lose concentration gear up gets forwarded up to the cloud. We posterior then heap up it into data warehouses; we bum do predictive analysis.” This beyond to the data-path send away for is enabled by the increased count functionality that manufacturers such as Cisco are building into their edge switches and routers. Fog Computing plays a role. Nonetheless it is a advanced pronunciation, this technology ahead has a designation backing bowels the globe of the modish data centre and the cloud. Bringing details adjust to the user. The middle of facts zoological unbecoming near the unresponsive creates a straightforward convene to cache observations or other help. These services would be located actual to the end-user to proceed on latency concerns and data access. Rather than of conformation inform at data centre sites anent outlandish the end-point, the Fuzz aims to place the data close to the end-user. Creating purblind geographical distribution. Fogginess computing extends forthright clouded advice by creating a help network which sits at numerous points. This, screen, geographically verbose infrastructure helps in numerous ways. Foremost of enclosing, chunky details and analytics arise be unalloyed faster with better results. Gifted-bodied, administrators are able to on ice location-based
One of the most important design problems for multi-UAV (Unmanned Air Vehicle) systems is the communication which is crucial for cooperation and collaboration between the UAVs. If all UAVs are directly connected to an infrastructure, such as a ground base or a satellite, the communication between UAVs can be realized through the in-frastructure. However, this infrastructure based communication architecture restricts the capabilities of the multi-UAV systems. Ad-hoc networking between UAVs can solve the problems arising from a fully infrastructure based UAV networks. In this paper, Flying Ad-Hoc Networks (FANETs) are surveyed which is an ad hoc network connecting the UAVs. The differences between FANETs, MANETs (Mobile Ad-hoc Networks) and VANETs (Vehicle Ad-Hoc Networks) are clarified first, and then the main FANET design challenges are introduced. Along with the existing MANET protocols, open research issues are also discussed.
Vaccine management system project report documentation..pdfKamal Acharya
The Division of Vaccine and Immunization is facing increasing difficulty monitoring vaccines and other commodities distribution once they have been distributed from the national stores. With the introduction of new vaccines, more challenges have been anticipated with this additions posing serious threat to the already over strained vaccine supply chain system in Kenya.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
Courier management system project report.pdfKamal Acharya
It is now-a-days very important for the people to send or receive articles like imported furniture, electronic items, gifts, business goods and the like. People depend vastly on different transport systems which mostly use the manual way of receiving and delivering the articles. There is no way to track the articles till they are received and there is no way to let the customer know what happened in transit, once he booked some articles. In such a situation, we need a system which completely computerizes the cargo activities including time to time tracking of the articles sent. This need is fulfilled by Courier Management System software which is online software for the cargo management people that enables them to receive the goods from a source and send them to a required destination and track their status from time to time.
Automobile Management System Project Report.pdfKamal Acharya
The proposed project is developed to manage the automobile in the automobile dealer company. The main module in this project is login, automobile management, customer management, sales, complaints and reports. The first module is the login. The automobile showroom owner should login to the project for usage. The username and password are verified and if it is correct, next form opens. If the username and password are not correct, it shows the error message.
When a customer search for a automobile, if the automobile is available, they will be taken to a page that shows the details of the automobile including automobile name, automobile ID, quantity, price etc. “Automobile Management System” is useful for maintaining automobiles, customers effectively and hence helps for establishing good relation between customer and automobile organization. It contains various customized modules for effectively maintaining automobiles and stock information accurately and safely.
When the automobile is sold to the customer, stock will be reduced automatically. When a new purchase is made, stock will be increased automatically. While selecting automobiles for sale, the proposed software will automatically check for total number of available stock of that particular item, if the total stock of that particular item is less than 5, software will notify the user to purchase the particular item.
Also when the user tries to sale items which are not in stock, the system will prompt the user that the stock is not enough. Customers of this system can search for a automobile; can purchase a automobile easily by selecting fast. On the other hand the stock of automobiles can be maintained perfectly by the automobile shop manager overcoming the drawbacks of existing system.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Immunizing Image Classifiers Against Localized Adversary Attacks
Types of Operators in C
1. For more Https://www.ThesisScientist.com
Unit 3
Operators
Operators
An operator is a symbol that tells the computer to perform certain mathematical or logical manipulation on
data stored in variables. The variables that are operated are termed as operands.
C operators can be classified into a number of categories. They include:
1. Arithmetic operators
2. Relational operators
3. Logical operators
4. Assignment operator
5. Increment and decrement operators
6. Conditional operator
7. Bitwise operators
8. Special operators
Now, let us discuss each category in detail.
Arithmetic Operators
C provides all the basic arithmetic operators. There are five arithmetic operators in C.
Operator Purpose
+ Addition
- Subtraction
* Multiplication
/ Division
% Remainder after integer division
The division operator (/) requires the second operand as non zero, though the operands need not be integers.
The operator (%) is known as modulus operator. It produces the remainder after the division of two
operands. The second operand must be non-zero.
All other operators work in their normal way.
2. 70
Relational Operators
Relational operator is used to compare two operands to see whether they are equal to each other, unequal,
or one is greater or lesser than the other.
The operands can be variables, constants or expressions, and the result is a numerical value. There are six
relational operators.
= = equal to
! = not equal to
< less than
< = less than or equal to
> greater than
> = greater than or equal to
A simple relation contains only one relational expression and takes the following form:
ae-1 relational operator ae-2
ae-1 and ae-2 are arithmetic expressions, which may be simple constants, variables or combination of these.
The value of the relational operator is either 1 or 0. If the relation is true, result is 1 otherwise it is 0.
e.g.: Expressions Result
4.5 < = 10 True
4.5 < -10 False
-35 > = 0 False
10 < 7+5 True
Logical Operators
Logical operators are used to combine two or more relational expressions. C provides three logical
operators.
Operator Meaning
&& Logical AND
¦¦ Logical OR
! Logical NOT
The result of Logical AND will be true only if both operands are true. While the result of a Logical OR
operation will be true if either operand is true. Logical NOT (!) is used for reversing the value of the
expression.
The expression which combines two or more relational expressions is termed as Logical Expression or
Compound Relational Expression which yields either 1 or 0.
e.g.: 1. if (age > 50 && weight < 80)
2. if ( a < 0 ¦ ¦ ch = = 'a')
3. if (! (a < 0))
3. 71
Assignment Operators
Assignment operators are used to assign the result of an expression to a variable. The most commonly used
assignment operator is (=). Note that it is different from mathematical equality.
An expression with assignment operator is of the following form:
identifier = expression
#include <stdio.h>
main( )
{
int i;
i = 5;
printf ("%d", i);
i = i + 10;
printf ("n%d", i);
}
output will be: 5
15
In this program i = i+10; is an assignment expression which assigns the value of i+10 to i.
Expressions like i = i+10, i = i – 5, i = i*2, i = i/6, and i = i*4, can be rewritten using shorthand assignment
operators.
The advantages of using assignment operators are:
1. The statement is more efficient and easier to read.
2. What appears on the L.H.S need not to be repeated and therefore it becomes easier to write for long
variable names.
Increment and Decrement Operators
C has two very useful operators ++ and -- called increment and decrement operators respectively. These are
generally not found in other languages. These operators are called unary operators as they require only one
operand. This operand should necessarily be a variable not a constant.
The increment operator (++) adds one to the operand while the decrement operator (--) subtracts one from
the operand.
These operators may be used either before or after the operand. When they are used before the operand, it is
termed as prefix, while when used after the operand, they are termed as postfix operators.
e.g.: int i = 5;
i++;
++i;
––i;
i––;
e.g.: b = a ++; this is postfix increment expression. In the expression
firstly b = a; then a = a+1; will be executed, while in prefix increment
expression
b = - - a;
firstly a = a-1; then b = a; will be executed.
4. 72
e.g.: # include <stdio.h>
main( )
{
int a = 10; b = 0;
a++;
printf ("n a = %d", a);
b = ++a;
printf ("n a = % d, b = % d", a, b);
b = a++;
printf ("n a = % d, b = % d", a, b);
}
output: a = 11
a = 12 b = 12
a = 13 b = 12
Conditional Operator
A ternary operator is one which contains three operands. The only ternary operator available in C language
is conditional operator pair "?:". It is of the form:
exp1 ? exp2 : exp3 ;
This operator works as follows. Exp1 is evaluated first. If the result is true then exp2 is executed, otherwise
exp3 is executed.
e.g.: a = 10;
b = 15;
x = (a > b ? a: b)
In this expression value of b will be assigned to x.
Bitwise Operators
Bitwise operators are used for manipulation of data at bit level. These operators are used for testing the bits,
or shifting them right or left. Bitwise operators may not be applied to float or double data type. It is
applicable to integer data types data only.
Some Bitwise Operators
Operator Meaning
& Bitwise Logical AND
¦ Bitwise Logical OR
^ Bitwise Logical XOR
<< Left shift
>> Right shift
~ One's complement
| (Bit-wise OR) :binary operator takes two operands of int type and
performs bit-wise OR operation. With assumption that int
size is 8-bits:
5. 73
int a = 5; [binary : 0000 0101]
int b = 9; [binary : 0000 1001]
a | b yields [binary : 0000 1101]
& (Bit-wise AND) :binary operator takes two operands of int type and
performs bit-wise AND operation. With same assumption
on int size as above:
int a = 5; [binary : 0000 0101]
int b = 9; [binary : 0000 1001]
a & b yields [binary : 0000 0001]
^ (Bit-wise Logical XOR) :XOR gives 1 if only one of the operand is 1 else 0. With
same assumption on int size as above:
int a = 5; [binary : 0000 0101]
int b = 9; [binary : 0000 1001]
a ^ b yields [binary : 0000 1100]
<< (Shift left) :This operator shifts the bits towards left padding the
space with 0 by given integer times.
int a = 5; [binary : 0000 0101]
a << 3 yeilds [binary : 0010 1000]
>> (Shift right) :This operator shifts the bits towards right padding the
space with 0.
int a = 5; [binary : 0000 0101]
a >> 3 yeilds [binary : 0000 0000]
~ (one’s complement operator) :It is a uniary operator that causes the bits of its operand to
be inverted so that 1 becomes 0 and vice-versa. The
opearator must always precede the operand and must be
integer type of all sizes. Assuming that int type is of 1 byte
size:
inr a = 5; [binary : 0000 0101]
~a; [binary : 1111 1010]
Special Operators
C language supports some special operators such as comma operator, sizeof operator, pointer operators (&
and *), and member selection operators (. and ->). Pointer operators will be discussed while introducing
pointers and member selection operators will be discussed with structures and union. Right now, we will
discuss comma operator and sizeof operator.
(a) Comma Operator
This operator is used to link the related expressions together.
6. 74
e.g.: int val, x, y;
value = (x = 0, y = 5, x+y);
It first assigns 10 to x, then 5 to y, finally sum x+y to val.
(b) sizeof Operator
The sizeof operator is a compile time operator and when used with an operand, it returns the
number of bytes the operand occupies. The operand may be a variable, a constant or a data type
qualifier.
e.g.: int n;
n = sizeof (int);
printf ("%d", n);
output: n = 2 /* Assuming that int size is 2 bytes */
Operator Precedence
Precedence defines the sequence in which operators are to be applied on the operands while evaluating the
expressions involving more than one operators. Operators of same precedence are evaluated from left to
right or right to left, depending upon the level. This is known as associativity property of an operator.
Summary of Precedence and Associativity
DESCRIPTION OPERATORS ASSOCIATIVITY
Function expression ( ) LR
Array expression [ ] LR
Structure operator LR
Structure operator . LR
Unary Minus - RL
Increment/Decrement ++ -- RL
One's complement ~ RL
Negation ! RL
Address of & RL
Value at address * RL
Type cast (type) RL
Size in bytes sizeof RL
Multiplication * LR
Division / LR
Modulus % LR
Addition + LR
Subtraction - LR
Left shift << LR
Right shift >> LR
Less than < LR
Less than or equal to < = LR
Greater than > LR
Greater than or equal to > = LR
Equal to = = LR
7. 75
Not equal to ! = LR
Bitwise AND & LR
Bitwise XOR ^ LR
Bitwise OR | LR
Logical AND && LR
Logical OR || LR
Conditional ?: RL
Assignment = RL
* = / = % = RL
+ = - = & = RL
^ = | = RL
<< = >> = RL
Comma , RL
Type Modifiers
The Basic Data Types may have modifiers preceding them to indicate special properties of the objects
being declared. These modifiers change the meaning of the Basic data types to suit the specific needs.
These modifiers are unsigned, signed, long and short. It is also possible to give these modifiers in
combination, e.g., unsigned log int.
Modifiers for char Data Type
char data type can be qualified as either signed or unsigned, both occupying one byte each, but having
different ranges. A signed char is same as an ordinary char and has a range from -128 to +127; whereas an
unsigned char has a range from 0 to 255. By default char is unsigned.
e.g.: main ( )
{
char ch = 291;
printf ("%dt%cn", ch, ch);
}
output: 35 #
Here ch has been defined as a char, and a char cannot take a value bigger than +128. That is why assigned
value of ch, 291 is considered to be 35 (291-128).
Modifiers for int Data Type
Integer quantities can be defined as short int, long int or unsigned int. short int occupies two bytes of space,
whereas long int occupies 4 bytes of space. A signed int has the same memory requirements as an unsigned
int (or a short int or a long int), the leftmost bit is reserved for the sign. With an unsigned int, all the bits are
used to represent the numerical value. The unsigned qualifier can also be applied to other qualified int. For
example, unsigned short int or unsigned long int. By default, modifier assumed with integers is signed.
Modifiers for double and float Data Type
Modifier long is used with double data type but not with float. Long double occupies 10 bytes of memory
space (usually, but actual size depends on implementation and hardware platform).
8. 76
Data Type Range Bytes Format
signed char -128 to + 127 1 %c
unsigned char 0 to 255 1 %c
short signed int -32768 to 32767 2 %d
short unsigned int 0 to 65535 2 %u
long signed int -2147483648 to +2147483647 4 %ld
long unsigned int 0 to 4294967295 4 %lu
float -3.4e38 to 3.4e38 4 %f
double -1.7e308 to +1.7e308 8 %lf