This document provides information on various data types in C programming language including integer, float, character and their properties. It discusses the size of basic data types using sizeof operator and size_t type. It also demonstrates the use of format specifiers in printf() statement to print values of different types and handles overflow, underflow cases. Code snippets are included to illustrate concepts around variable declaration, initialization, input-output using scanf() and printf().
C Programming Language is the most popular computer language and most used programming language till now. It is very simple and elegant language. This lecture series will give you basic concepts of structured programming language with C.
C Programming Language is the most popular computer language and most used programming language till now. It is very simple and elegant language. This lecture series will give you basic concepts of structured programming language with C.
Fundamental of C Programming Language and Basic Input/Output Functionimtiazalijoono
Fundamental of C Programming Language
and
Basic Input/Output Function
contents
C Development Environment
C Program Structure
Basic Data Types
Input/Output function
Common Programming Error
C Programming Language is the most popular computer language and most used programming language till now. It is very simple and elegant language. This lecture series will give you basic concepts of structured programming language with C.
C Programming Language is the most popular computer language and most used programming language till now. It is very simple and elegant language. This lecture series will give you basic concepts of structured programming language with C.
Fundamental of C Programming Language and Basic Input/Output Functionimtiazalijoono
Fundamental of C Programming Language
and
Basic Input/Output Function
contents
C Development Environment
C Program Structure
Basic Data Types
Input/Output function
Common Programming Error
Input refers to accepting data while output refers to presenting data. Normally the data is accepted from keyboard and is outputted onto the screen.
C language has a series of standard input-output (I/O) functions. Such I/O functions together form a library named stdio.h. Irrespective of the version of C language, user will have access to all such library functions. These library functions are classified into three broad categories.
a) Console I/O functions : Functions which accept input from keyboard and produce output on the screen.
b) Disk I/O functions : Functions which perform I/O operations on secondary storage devices like floppy disks or hard disks.
c) Port I/O functions : Functions which perform I/O operations on various ports like printer port, mouse port, etc.
Console I/
A general coverage of the C language is presented. These slides are useful for students attending C courses at universities and other institutions as well as others following C tutorials or learning the language by themselves. Comments are welcome for creating better future.
Faculty of Eng. & Computer Sciences of IEU, Izmir-Turkey,
Assoc. Prof. Dr. S. Kondakci
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
Worried about document security while sharing them in Salesforce? Fret no more! Here are the top-notch security standards XfilesPro upholds to ensure strong security for your Salesforce documents while sharing with internal or external people.
To learn more, read the blog: https://www.xfilespro.com/how-does-xfilespro-make-document-sharing-secure-and-seamless-in-salesforce/
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Hivelance Technology
Cryptocurrency trading bots are computer programs designed to automate buying, selling, and managing cryptocurrency transactions. These bots utilize advanced algorithms and machine learning techniques to analyze market data, identify trading opportunities, and execute trades on behalf of their users. By automating the decision-making process, crypto trading bots can react to market changes faster than human traders
Hivelance, a leading provider of cryptocurrency trading bot development services, stands out as the premier choice for crypto traders and developers. Hivelance boasts a team of seasoned cryptocurrency experts and software engineers who deeply understand the crypto market and the latest trends in automated trading, Hivelance leverages the latest technologies and tools in the industry, including advanced AI and machine learning algorithms, to create highly efficient and adaptable crypto trading bots
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Modern design is crucial in today's digital environment, and this is especially true for SharePoint intranets. The design of these digital hubs is critical to user engagement and productivity enhancement. They are the cornerstone of internal collaboration and interaction within enterprises.
3. Bit: the smallest unit of a hardware memory “Binary digit”.
Byte: the computer memory unit, it’s 8-bit for nearly all computers.
Word: the natural computer memory unit for a given processor architecture,
for example 8-bit microcomputers has word size of 8-bit for early IBM
compatibles using 80286 processors are 16-bit which means word size are 16-
bit long, and so on….
4. /* print1.c-displays some properties of printf() */
#include <stdio.h>
int main(void)
{
int ten = 10;
int two = 2;
printf("Doing it right: ");
printf("%d minus %d is %dn", ten, 2, ten - two );
printf("Doing it wrong: ");
printf("%d minus %d is %dn", ten ); // forgot 2 arguments
return 0;
}
6. Integer
An integer is a number with no fractional part. In C, an integer is never
written with a decimal point. Examples are 2, –23, and 2456. Numbers
such as 3.14, 0.22, and 2.000 are not integers. Integers are stored as
binary numbers. The integer 7, for example, is written 111 in binary.
Therefore, to store this number in an 8-bit byte, just set the first 5 bits
to 0 and the last 3 bits to 1
7. Float
A floating-point number more or less corresponds to what
mathematicians call a real number. Real numbers include the numbers
between the integers. Some floating-point numbers are 2.75, 3.16E7,
7.00, and 2e–8. Notice that adding a decimal point makes a value a
floating-point value. So 7 is an integer type but 7.00 is a floating-point
type. Obviously, there is more than one way to write a floating-point
number. We will discuss the e-notation more fully later, but, in brief, the
notation 3.16E7 means to multiply 3.16 by 10 to the 7th power; that is,
by 1 followed by 7 zeros. The 7 would be termed the exponent of 10.
8. /* Weight.c -- your weight in gm */
#include <stdio.h>
int main(void)
{
float weight; /* user weight */
float value; /* rhodium equivalent */
printf(“Are you worth your weight in rhodium.n");
printf(“Let’s check it out.n”);
printf("Please enter your weight in pounds: ");
9. /* get input from the user */
scanf("%f", &weight);
/* assume rhodium is $770 per ounce */
/* 14.5833 converts pounds into rhodium unit*/
value = 770.0 * weight * 14.5833;
printf("Your weight in rhodium is worth $%.2f.n", value);
printf("You are easily worth that! If rhodium prices drop,n");
printf("eat more to maintain your value.n");
}
10. Output
Are you worth your weight in rhodium?
Let's check it out.
Please enter your weight in pounds: 150
Your weight in rhodium is worth $1684371.12.
You are easily worth that! If rhodium prices drop,
eat more to maintain your value.
12. Output
dec = 100; octal 144; hex = 64
dec = 100; octal = = 0144; hex = 0x64
13. Declaring Other Integer Types
long int estine;
long johns;
short int erns;
short ribs;
unsigned int s_count;
unsigned players;
unsigned long headcount;
unsigned short yesvotes;
long long ago;
14. Integer Overflow
#include <stdio.h>
int main(void)
{
int i = 2147483647;
unsigned int j = 4294967295;
printf("%d %d %dn", i, i+1, i+2);
printf("%u %u %un", j, j+1, j+2);
return 0;
}
16. Printing short, long, long long, and
unsigned Types
To print an unsigned int number, use the %u notation. To print a long value, use
the %ld format specifier. If int and long are the same size on your system, just
%d will suffice, the %ld specifier for long. the %lx to print a long integer in
hexadecimal format and %lo to print in octal format the %hd displays a short
integer in decimal form, and %ho displays a short integer in octal form. Both the
h and l prefixes can be used with u for unsigned types. the %lu for unsigned long
types. the %lld and %llu for the signed long long and unsigned long long,
respectively.
17. /* print2.c-more printf() properties */
#include <stdio.h>
int main(void)
{
unsigned int un = 3000000000; /* system with 32-bit int */
short end = 200; /* and 16-bit short */
long big = 65537;
long long verybig = 12345678908642;
printf("un = %u and not %dn", un, un);
printf("end = %hd and %dn", end, end);
printf("big = %ld and not %hdn", big, big);
printf("verybig= %lld and not %ldn", verybig, verybig);
return 0;
}
18. Output
un = 3000000000 and not -1294967296
end = 200 and 200
big = 65537 and not 1
verybig= 12345678908642 and not 1942899938
19. Match the Type printf() Specifiers
Remember to check to see that you have one format specifier for each value being
displayed in a printf() statement. And also check that the type of each format
specifier matches the type of the corresponding display value
20. Character Constants and Initialization
char response;
char itable, latan;
char grade = 'A';
char broiled; /* declare a char variable */
broiled = 'T'; /* OK */
broiled = T; /* NO! Thinks T is a variable */
broiled = "T"; /* NO! Thinks "T" is a string */
char grade = 65; /* ok for ASCII, but poor style */
21. Character Escape Sequences
a Alert (ANSI C).
b Backspace.
f Form feed.
n Newline.
r Carriage return.
t Horizontal tab.
v Vertical tab.
Backslash ().
‘ Single quote (').
22. “ Double quote (").
? Question mark (?).
0oo Octal value. (o represents an octal digit.)
xhh Hexadecimal value. (h represents a hexadecimal digit.)
Example
char nerf = 'n';
and then print the variable nerf to advance the printer or screen one line.
23. /* charcode.c-displays code number for a character */
#include <stdio.h>
int main(void)
{
char ch;
printf("Please enter a character.n");
scanf("%c", &ch); /* user inputs character */
printf("The code for %c is %d.n", ch, ch);
return 0;
}
25. Printing Floating-Point Values
The printf() function uses the %f format specifier to print type float and double
numbers using decimal notation, and it uses %e to print them in exponential
notation. If your system supports the C99 hexadecimal format for floating-point
numbers, you can use a or A instead of e or E. The long double type requires the
%Lf, %Le, and %La specifiers to print that type. Note that both float and double
use the %f, %e, or %a specifier for output. That's because C automatically expands
type float values to type double when they are passed as arguments to any
function, such as printf().
26. /* showf_pt.c -- displays float value in two ways */
#include <stdio.h>
int main(void)
{
float aboat = 32000.0;
double abet = 2.14e9;
long double dip = 5.32e-5;
printf("%f can be written %en", aboat, aboat);
printf("%f can be written %en", abet, abet);
printf("%f can be written %en", dip, dip);
return 0;
}
27. Output
32000.000000 can be written 3.200000e+04
2140000000.000000 can be written 2.140000e+09
0.000053 can be written 5.320000e-05
28. Floating-Point Overflow and Underflow
Suppose the biggest possible float value on your system is about 3.4E38 and you
do this:
float toobig = 3.4E38 * 100.0f;
printf("%en", toobig);
What happens? This is an example of overflow—when a calculation leads to a
number too large to be expressed. The behavior for this case used to be undefined,
but now C specifies that too big gets assigned a special value that stands for
infinity and that printf() displays either inf or infinity (or some variation on that
theme) for the value.
29. /* floaterr.c--demonstrates round-off error */
#include <stdio.h>
int main(void)
{
float a,b;
b = 2.0e20 + 1.0;
a = b - 2.0e20;
printf("%f n", a);
return 0;
}
30. Output
0.000000 “older gcc on Linux”
-13584010575872.000000 “Turbo C 1.5”
4008175468544.000000 “CodeWarrior 9.0, MSVC++ 7.1”
31. The sizeof() Operator & the size_t type
• the sizeof() operator returns the size, in bytes, of its operand. The
operand can be a specific data object, such as the name of a variable, or
it can be a type. If it is a type, such as float, the operand must be
enclosed in parentheses.
• C says that sizeof returns a value of type size_t. This is an unsigned
integer type, but not a brand-new type. Instead, like the portable types
(int32_t and so on), it is defined in terms of the standard types
32. #include <stdio.h>
int main(void)
{
int n = 0;
size_t intsize;
intsize = sizeof (int);
printf("n = %d, n has %ud bytes; all ints have %ud bytes.n", n,
sizeof(n), intsize );
return 0;
}