The document discusses Java character sets, tokens, keywords, identifiers, literals, and data types. It provides details on:
1. Java uses the Unicode character set which supports characters from many languages.
2. The smallest individual units in a Java program are called tokens, which include keywords, identifiers, literals, punctuators, and operators.
3. Keywords are reserved words with special meanings, identifiers name variables and other items, and literals are fixed data values like integers and strings.
The document outlines key concepts in C programming including data types, tokens, keywords, identifiers, constants, variables, and scopes. It discusses the five fundamental data types in C (integer, floating-point, double, character, void), tokens like keywords and identifiers, common keywords and their meanings, rules for identifiers, how variables are declared and initialized, what constants are (fixed values that don't change), and the four scopes in C.
The document discusses lexical analysis in compiler design. It covers the role of the lexical analyzer, tokenization, and representation of tokens using finite automata. Regular expressions are used to formally specify patterns for tokens. A lexical analyzer generator converts these specifications into a finite state machine (FSM) implementation to recognize tokens in the input stream. The FSM is typically a deterministic finite automaton (DFA) for efficiency, even though a nondeterministic finite automaton (NFA) may require fewer states.
The document discusses various operators in C language including arithmetic, relational, logical, bitwise, assignment and conditional operators. It provides examples of using each operator and the expected output. The order of operations and associativity rules are also covered. Various format specifiers used in printf and scanf functions are explained along with examples.
The document discusses the role and implementation of a lexical analyzer. It can be summarized as:
1. A lexical analyzer scans source code, groups characters into lexemes, and produces tokens which it returns to the parser upon request. It handles tasks like removing whitespace and expanding macros.
2. It implements buffering techniques to efficiently scan large inputs and uses transition diagrams to represent patterns for matching tokens.
3. Regular expressions are used to specify patterns for tokens, and flex is a common language for implementing lexical analyzers based on these specifications.
The document discusses lexical analysis and how it relates to parsing in compilers. It introduces basic terminology like tokens, patterns, lexemes, and attributes. It describes how a lexical analyzer works by scanning input, identifying tokens, and sending tokens to a parser. Regular expressions are used to specify patterns for token recognition. Finite automata like nondeterministic and deterministic finite automata are constructed from regular expressions to recognize tokens.
This document discusses regular expressions, which are sequences of symbols used to describe patterns in text. Regular expressions are built recursively using operators like union, concatenation, and closure applied to the symbols of an alphabet. The notation defines regular expressions and the languages they denote. Key rules include: (1) r|s denotes the union of the languages of r and s; (2) rs denotes the concatenation of r and s; and (3) r* denotes the Kleene closure - zero or more repetitions - of r. Precedence rules simplify expressions by dropping unnecessary parentheses.
The document outlines key concepts in C programming including data types, tokens, keywords, identifiers, constants, variables, and scopes. It discusses the five fundamental data types in C (integer, floating-point, double, character, void), tokens like keywords and identifiers, common keywords and their meanings, rules for identifiers, how variables are declared and initialized, what constants are (fixed values that don't change), and the four scopes in C.
The document discusses lexical analysis in compiler design. It covers the role of the lexical analyzer, tokenization, and representation of tokens using finite automata. Regular expressions are used to formally specify patterns for tokens. A lexical analyzer generator converts these specifications into a finite state machine (FSM) implementation to recognize tokens in the input stream. The FSM is typically a deterministic finite automaton (DFA) for efficiency, even though a nondeterministic finite automaton (NFA) may require fewer states.
The document discusses various operators in C language including arithmetic, relational, logical, bitwise, assignment and conditional operators. It provides examples of using each operator and the expected output. The order of operations and associativity rules are also covered. Various format specifiers used in printf and scanf functions are explained along with examples.
The document discusses the role and implementation of a lexical analyzer. It can be summarized as:
1. A lexical analyzer scans source code, groups characters into lexemes, and produces tokens which it returns to the parser upon request. It handles tasks like removing whitespace and expanding macros.
2. It implements buffering techniques to efficiently scan large inputs and uses transition diagrams to represent patterns for matching tokens.
3. Regular expressions are used to specify patterns for tokens, and flex is a common language for implementing lexical analyzers based on these specifications.
The document discusses lexical analysis and how it relates to parsing in compilers. It introduces basic terminology like tokens, patterns, lexemes, and attributes. It describes how a lexical analyzer works by scanning input, identifying tokens, and sending tokens to a parser. Regular expressions are used to specify patterns for token recognition. Finite automata like nondeterministic and deterministic finite automata are constructed from regular expressions to recognize tokens.
This document discusses regular expressions, which are sequences of symbols used to describe patterns in text. Regular expressions are built recursively using operators like union, concatenation, and closure applied to the symbols of an alphabet. The notation defines regular expressions and the languages they denote. Key rules include: (1) r|s denotes the union of the languages of r and s; (2) rs denotes the concatenation of r and s; and (3) r* denotes the Kleene closure - zero or more repetitions - of r. Precedence rules simplify expressions by dropping unnecessary parentheses.
Data Types and Variables In C ProgrammingKamal Acharya
This document discusses data types and variables in C programming. It defines the basic data types like integer, floating point, character and void. It explains the size and range of integer and floating point data types. It also covers user-defined data types using typedef and enumeration. Variables are used to store and manipulate data in a program and the document outlines the rules for declaring variables and assigning values to them.
The document discusses Java's primitive data types including their ranges and literal constants. It covers char, boolean, byte, short, int, long, float, and double data types. It also discusses variables, symbolic constants, and arithmetic operators.
Data types in java | What is Datatypes in Java | Learning with RD | Created b...rahuldaredia21
In this presentation , i will present a what are the datatypes in java? in brief and use easy world to understand easily about datatype but more important think in this presentation is diagram because any types of topic like In Byte understand in theory but easily understand in only diagrams and all about details of byte and also in case all datatypes in java give understand in diagrams then also watch video on youtube to understand more about datatypes link in this description .
https://youtu.be/pOBS9wBXVjY
click on link and watch this video understand datatypes easily.
THANK YOU
The document discusses the role and process of lexical analysis in compilers. It can be summarized as:
1) Lexical analysis is the first phase of a compiler that reads source code characters and groups them into tokens. It produces a stream of tokens that are passed to the parser.
2) The lexical analyzer matches character sequences against patterns defined by regular expressions to identify lexemes and produce corresponding tokens.
3) Common tokens include keywords, identifiers, constants, and punctuation. The lexical analyzer may interact with the symbol table to handle identifiers.
C++ was created in the 1980s by Bjarne Stroustrup as an extension of the C language with object-oriented features. It combined features from C and Simula 67. The document provides an overview of the basic building blocks of C++ programs including characters, tokens, keywords, identifiers, literals, punctuators, operators, comments, streams, variables, and common errors. It describes the different data types and rules for writing identifiers, literals, and comments. It also explains common tokens like keywords, operators, and punctuators and how they are used in C++.
This document provides an overview of data types in C++. It discusses fundamental data types like int, char, float, and void, as well as derived data types like arrays, functions, pointers, references, constants, classes, structures, unions, and enumerations. For each data type, it provides examples and explanations of how they are used and represented in memory. It also covers data type modifiers, variable declaration and initialization, and input/output stream manipulators for formatting output.
The document discusses lexical analysis, which is the first stage of syntax analysis for programming languages. It covers terminology, using finite automata and regular expressions to describe tokens, and how lexical analyzers work. Lexical analyzers extract lexemes from source code and return tokens to the parser. They are often implemented using finite state machines generated from regular grammar descriptions of the lexical patterns in a language.
This document provides an overview of constants, variables, and data types in the C programming language. It discusses the different categories of characters used in C, C tokens including keywords, identifiers, constants, strings, special symbols, and operators. It also covers rules for identifiers and variables, integer constants, real constants, single character constants, string constants, and backslash character constants. Finally, it describes the primary data types in C including integer, character, floating point, double, and void, as well as integer, floating point, and character types.
This document provides an introduction to the basic structure, syntax, data types, variables, constants, and input/output functions in the C programming language. It explains that a C program consists of pre-processor commands, functions, variables, statements, expressions, and comments. It also describes C's character set, tokens, keywords, identifiers, literals, strings, punctuators, operators, and fundamental and derived data types like integers, floats, characters, arrays, and structures. Finally, it discusses defining and initializing variables and constants, and using the printf() and scanf() functions for output and input.
This document provides an introduction to constants and variables in the C programming language. It discusses C's character set including letters, digits, special characters, and white spaces. It also covers C tokens, keywords and identifiers. The document defines different types of constants in C like numeric constants (integer and real), character constants, string constants, and backslash character constants. It describes variables in C including rules for defining variables. It provides examples of declaring and assigning values to variables. The overall summary is that this document serves as an introductory lesson on the basic building blocks of constants and variables used in the C programming language.
- Bjarne Stroustrup is credited as the creator of C++.
- There are different types of tokens in C++ including keywords, identifiers, variables, constants, punctuators, and operators.
- Key concepts discussed include variables, constants, data types, expressions, input/output, control statements like if/else and loops.
- The document provides an overview of many fundamental C++ concepts in a structured manner.
Introduction to C Programming - R.D.SivakumarSivakumar R D .
This document provides an introduction to the C programming language including basic elements like constants, identifiers, operators, and keywords. It discusses the different types of constants like integer, floating point, character, and string constants. It also covers fundamental data types in C like int, float, and char, as well as derived types like long, double, unsigned, arrays, and pointers. Finally, it summarizes operators in C including unary operators like address of and increment/decrement.
The document discusses parsing and compiler design concepts. It defines parsing as verifying that a string of tokens can be generated by a grammar and constructing a parse tree. It covers parse tree vs syntax tree, different types of grammars, derivation and reduction processes, ambiguous grammars, left recursion elimination, left factoring, and computing first and follow sets. The key topics are role of parsers, parse trees, grammar classification, derivation, ambiguous grammars, parsing techniques like top-down and bottom-up, and syntax analysis concepts.
Lexical Analysis, Tokens, Patterns, Lexemes, Example pattern, Stages of a Lexical Analyzer, Regular expressions to the lexical analysis, Implementation of Lexical Analyzer, Lexical analyzer: use as generator.
The document discusses the role and process of lexical analysis using LEX. LEX is a tool that generates a lexical analyzer from regular expression rules. A LEX source program consists of auxiliary definitions for tokens and translation rules that match regular expressions to actions. The lexical analyzer created by LEX reads input one character at a time and finds the longest matching prefix, executes the corresponding action, and places the token in a buffer.
The document discusses various C++ data types including built-in, derived, and user-defined data types. It describes the different built-in data types like int, char, float, double, void and their properties. It also discusses derived data types like arrays, functions, pointers, references, and constant. The document further explains user-defined data types like structures, unions and classes/objects in C++.
FellowBuddy.com is a platform which has been setup with a simple vision, keeping in mind the dynamic requirements of students.
Our Vision & Mission - Simplifying Students Life
Our Belief - “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom-446240585585480
The document discusses parsing and context-free grammars. It defines parsing as constructing a parse tree from a stream of tokens using the rules of a context-free grammar. It provides examples of parse trees being built from both top-down and bottom-up parsing approaches. Key aspects of context-free grammars like non-terminals, terminals, production rules, and the start symbol are also summarized.
This document discusses variables and data types in C++. It defines a variable as a portion of memory used to store a value. Variables need unique identifiers as names. Valid identifiers can include letters, digits, and underscores, but not spaces or punctuation. Common data types in C++ include char for characters, int for integers, float for floating-point numbers, and bool for Boolean values. Variables can be declared with a data type and optionally initialized with a value assigned at declaration.
Brightwater Engineering General Presentationfletcher_mat
Brightwater Engineering Solutions is a rapidly growing engineering company that was established in 1956 and now employs over 350 staff. It provides turn-key project solutions across various industries including energy, resources, and bulk handling. Brightwater has offices in multiple countries and annual turnover of $150 million. It delivers projects through a full engineering and design process along with manufacturing capabilities.
Data Types and Variables In C ProgrammingKamal Acharya
This document discusses data types and variables in C programming. It defines the basic data types like integer, floating point, character and void. It explains the size and range of integer and floating point data types. It also covers user-defined data types using typedef and enumeration. Variables are used to store and manipulate data in a program and the document outlines the rules for declaring variables and assigning values to them.
The document discusses Java's primitive data types including their ranges and literal constants. It covers char, boolean, byte, short, int, long, float, and double data types. It also discusses variables, symbolic constants, and arithmetic operators.
Data types in java | What is Datatypes in Java | Learning with RD | Created b...rahuldaredia21
In this presentation , i will present a what are the datatypes in java? in brief and use easy world to understand easily about datatype but more important think in this presentation is diagram because any types of topic like In Byte understand in theory but easily understand in only diagrams and all about details of byte and also in case all datatypes in java give understand in diagrams then also watch video on youtube to understand more about datatypes link in this description .
https://youtu.be/pOBS9wBXVjY
click on link and watch this video understand datatypes easily.
THANK YOU
The document discusses the role and process of lexical analysis in compilers. It can be summarized as:
1) Lexical analysis is the first phase of a compiler that reads source code characters and groups them into tokens. It produces a stream of tokens that are passed to the parser.
2) The lexical analyzer matches character sequences against patterns defined by regular expressions to identify lexemes and produce corresponding tokens.
3) Common tokens include keywords, identifiers, constants, and punctuation. The lexical analyzer may interact with the symbol table to handle identifiers.
C++ was created in the 1980s by Bjarne Stroustrup as an extension of the C language with object-oriented features. It combined features from C and Simula 67. The document provides an overview of the basic building blocks of C++ programs including characters, tokens, keywords, identifiers, literals, punctuators, operators, comments, streams, variables, and common errors. It describes the different data types and rules for writing identifiers, literals, and comments. It also explains common tokens like keywords, operators, and punctuators and how they are used in C++.
This document provides an overview of data types in C++. It discusses fundamental data types like int, char, float, and void, as well as derived data types like arrays, functions, pointers, references, constants, classes, structures, unions, and enumerations. For each data type, it provides examples and explanations of how they are used and represented in memory. It also covers data type modifiers, variable declaration and initialization, and input/output stream manipulators for formatting output.
The document discusses lexical analysis, which is the first stage of syntax analysis for programming languages. It covers terminology, using finite automata and regular expressions to describe tokens, and how lexical analyzers work. Lexical analyzers extract lexemes from source code and return tokens to the parser. They are often implemented using finite state machines generated from regular grammar descriptions of the lexical patterns in a language.
This document provides an overview of constants, variables, and data types in the C programming language. It discusses the different categories of characters used in C, C tokens including keywords, identifiers, constants, strings, special symbols, and operators. It also covers rules for identifiers and variables, integer constants, real constants, single character constants, string constants, and backslash character constants. Finally, it describes the primary data types in C including integer, character, floating point, double, and void, as well as integer, floating point, and character types.
This document provides an introduction to the basic structure, syntax, data types, variables, constants, and input/output functions in the C programming language. It explains that a C program consists of pre-processor commands, functions, variables, statements, expressions, and comments. It also describes C's character set, tokens, keywords, identifiers, literals, strings, punctuators, operators, and fundamental and derived data types like integers, floats, characters, arrays, and structures. Finally, it discusses defining and initializing variables and constants, and using the printf() and scanf() functions for output and input.
This document provides an introduction to constants and variables in the C programming language. It discusses C's character set including letters, digits, special characters, and white spaces. It also covers C tokens, keywords and identifiers. The document defines different types of constants in C like numeric constants (integer and real), character constants, string constants, and backslash character constants. It describes variables in C including rules for defining variables. It provides examples of declaring and assigning values to variables. The overall summary is that this document serves as an introductory lesson on the basic building blocks of constants and variables used in the C programming language.
- Bjarne Stroustrup is credited as the creator of C++.
- There are different types of tokens in C++ including keywords, identifiers, variables, constants, punctuators, and operators.
- Key concepts discussed include variables, constants, data types, expressions, input/output, control statements like if/else and loops.
- The document provides an overview of many fundamental C++ concepts in a structured manner.
Introduction to C Programming - R.D.SivakumarSivakumar R D .
This document provides an introduction to the C programming language including basic elements like constants, identifiers, operators, and keywords. It discusses the different types of constants like integer, floating point, character, and string constants. It also covers fundamental data types in C like int, float, and char, as well as derived types like long, double, unsigned, arrays, and pointers. Finally, it summarizes operators in C including unary operators like address of and increment/decrement.
The document discusses parsing and compiler design concepts. It defines parsing as verifying that a string of tokens can be generated by a grammar and constructing a parse tree. It covers parse tree vs syntax tree, different types of grammars, derivation and reduction processes, ambiguous grammars, left recursion elimination, left factoring, and computing first and follow sets. The key topics are role of parsers, parse trees, grammar classification, derivation, ambiguous grammars, parsing techniques like top-down and bottom-up, and syntax analysis concepts.
Lexical Analysis, Tokens, Patterns, Lexemes, Example pattern, Stages of a Lexical Analyzer, Regular expressions to the lexical analysis, Implementation of Lexical Analyzer, Lexical analyzer: use as generator.
The document discusses the role and process of lexical analysis using LEX. LEX is a tool that generates a lexical analyzer from regular expression rules. A LEX source program consists of auxiliary definitions for tokens and translation rules that match regular expressions to actions. The lexical analyzer created by LEX reads input one character at a time and finds the longest matching prefix, executes the corresponding action, and places the token in a buffer.
The document discusses various C++ data types including built-in, derived, and user-defined data types. It describes the different built-in data types like int, char, float, double, void and their properties. It also discusses derived data types like arrays, functions, pointers, references, and constant. The document further explains user-defined data types like structures, unions and classes/objects in C++.
FellowBuddy.com is a platform which has been setup with a simple vision, keeping in mind the dynamic requirements of students.
Our Vision & Mission - Simplifying Students Life
Our Belief - “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom-446240585585480
The document discusses parsing and context-free grammars. It defines parsing as constructing a parse tree from a stream of tokens using the rules of a context-free grammar. It provides examples of parse trees being built from both top-down and bottom-up parsing approaches. Key aspects of context-free grammars like non-terminals, terminals, production rules, and the start symbol are also summarized.
This document discusses variables and data types in C++. It defines a variable as a portion of memory used to store a value. Variables need unique identifiers as names. Valid identifiers can include letters, digits, and underscores, but not spaces or punctuation. Common data types in C++ include char for characters, int for integers, float for floating-point numbers, and bool for Boolean values. Variables can be declared with a data type and optionally initialized with a value assigned at declaration.
Brightwater Engineering General Presentationfletcher_mat
Brightwater Engineering Solutions is a rapidly growing engineering company that was established in 1956 and now employs over 350 staff. It provides turn-key project solutions across various industries including energy, resources, and bulk handling. Brightwater has offices in multiple countries and annual turnover of $150 million. It delivers projects through a full engineering and design process along with manufacturing capabilities.
20140329 brand management chapter 4 iba mba48 eZeeshan Huq
Here are five things a coworker or friend can typically only do by relying on an expert or going to a central location, along with potential solutions:
1. Getting a prescription filled - A mobile pharmacy van or drone delivery service could deliver medications to people's homes on-demand.
2. Filing taxes - An AI tax filing assistant accessible via smartphone could guide people through the tax filing process from anywhere.
3. Scheduling medical appointments - A virtual healthcare provider platform allows video consultations with doctors and online appointment scheduling from home.
4. Hiring contractors for home projects - A mobile app connects people to local licensed contractors who can video chat about projects and submit estimates for approval.
5. Car repairs
20130831 brand management chapter 1 iba bba18Zeeshan Huq
The document discusses the evolution of marketing from focusing on the 4Ps (product, price, place, promotion) to a greater emphasis on brand management. It explains that a brand is a combination of visual elements, associations, and attributes that resides in consumers' minds. A brand defines the premium value of a company beyond its tangible assets. Products are what a company uses to deliver the brand promise communicated through advertising. Strong brands are driven by innovation and ideas that meet entrepreneurial skills. The best advertising proposes and makes consumers believe in the brand's delivery of its promise through products.
The survey results from the 4th hour class show that students want to hold longer conversations, especially with native German speakers. They also expressed interest in listening to German metal/Rammstein music and doing word searches. Some students suggested partner writing and exchanges as additional activities.
This document discusses psychological and social factors that influence consumer purchase behavior. It covers four key psychological influencers: motivation, perception, learning/attitudes/beliefs, and buying situation. Motivation is influenced by both stated and underlying motives, which can be explained by Maslow's hierarchy of needs. Perception is shaped by selective attention, distortion, and retention. Learning occurs through conditioning, social observation, and reasoning. Social factors include culture, social class, reference groups, family, and personal characteristics. The document provides examples and questions to help understand these concepts and their impact on marketing strategy.
This document from the Department of Commerce discusses various types of pollution including air, water, noise, and soil pollution. It provides details on:
- Air pollution is the most common and dangerous type, as it involves chemicals directly released into the air we breathe.
- Water pollution affects not just aquatic animals but the entire food chain through contaminants.
- Noise pollution increases noise levels in the environment and can be dangerous by controlling human minds.
- Soil pollution indirectly damages humans and animals by contaminating soil.
The document then focuses on air pollution, outlining its sources such as vehicles, industry, and agriculture. It describes the health effects of air pollution and provides recommendations for reducing air pollution through activities
Viral marketing refers to marketing techniques that use social networks to produce increases in brand awareness or sales through self-replicating viral processes like viruses. One example is Hotmail appending ads to outgoing emails from users. For a message to spread virally, it must appeal to individuals with high social networking potential who will present and spread it to others quickly. The environment is also crucial, as small changes can lead to huge results. Viral marketing may take various forms like videos, games, images or text messages. The goal is to create viral messages that high social individuals will spread to their networks.
This document discusses marketing factors that influence buyer behavior. It focuses on a marketing campaign by Ponds to revive the brand as the category leader. The campaign targets females aged 22-35 in SEC A with a monthly household income over 30,000 taka. The campaign includes advertisements like "Second Honeymoon" and "Lustrous Runway" as well as a diamond ring contest. Upcoming campaigns may include ones for Valentine's Day. The Ponds campaign utilizes digital and FM media.
20140315 brand management chapter 3 iba mba48 eZeeshan Huq
The document discusses step 1 in developing or building a brand, which is to decide what to brand. This could be a company, product category, product, promise, person, or concept. It is best to have a single brand which is the most durable way to build the brand. The challenge is to find a single point, such as the promise or purpose. It discusses extending brands across categories or products. Brands can be built on a promise, concept, or company. Key performance indicators should also be considered.
20140412 brand management chapter 6 iba mba48 eZeeshan Huq
This document discusses the importance of positioning a brand through defining its vision, mission, and values. It explains how to develop a brand positioning statement by identifying the target audience, category, compelling benefit, and reason to believe. Different types of positioning like functional and symbolic positioning are described. Examples of brand positioning statements are provided for various product categories like cleaning agents and toothpaste. The document emphasizes that the brand positioning statement should be memorable and portray a clear picture of what the brand stands for to its target consumers. It also discusses evaluating the effectiveness of a positioning statement.
Polyvore blogger workshop for fashion and beauty bloggersPolyvore
This document discusses various topics including transportation, infrastructure projects, education, healthcare, public safety, taxes, budgets, and policies over the next year. It outlines priorities and plans across many areas to improve services for residents while balancing the municipal budget. The overall goals are to enhance quality of life through new initiatives and maintain fiscal responsibility.
This document discusses the importance of social media and its influence on consumer behavior. It notes that nearly 1 in 5 minutes online are spent on social networks, with over half of that time spent on Facebook. The document recommends that companies maximize their use of social media consciously by having clearly defined goals, monitoring conversations, being transparent and responsive to feedback, and focusing on generating engaging content rather than just marketing messages. Maintaining a positive online reputation is important for earning customer trust and increasing sales.
CFIA 2012 Food Industry ingredients Competitive Intelligence ReportViedoc
CFIA has now become the place to be and go for professionals of the food business. Indeed, this is the only exhibition in France gathering under one roof the whole of the food industry suppliers providing Ingredients & Additives, Equipments & Food processing and Packaging. Some of the packaging solutions shown, like wooden or paper baking molds, are definitely only aimed at the food industry. Other packages on display however could very well be used in many other industrial sectors with or without any adjustments as the trend for lighter, more efficient and eco-designed packages is seen across all sectors. ...
This document provides information about C++ programming language tokens and input/output operations. It defines various tokens like keywords, identifiers, literals, punctuators, and operators. It explains the basic structure of a C++ program and defines important headers like iostream. It also describes input/output streams like cout and cin, and input/output operators like << and >>.
The document provides information about Bjarne Stroustrup, the creator of C++ programming language, and introduces some basic concepts of C++ like tokens, keywords, identifiers, literals, character set, and a simple "Hello World" program. It mentions that Stroustrup added object-oriented programming features to the C language and named it C++. The document also lists different types of tokens, literals, and operators used in C++.
Constants Variables Datatypes by Mrs. Sowmya JyothiSowmyaJyothi3
C provides various data types to store different types of data. The main data types are integer, float, double, and char. Variables are used to store and manipulate data in a program. Variables must be declared before use, specifying the data type. Constants are fixed values that don't change, and can be numeric, character, or string values. Symbolic constants can be defined to represent constant values used throughout a program. Input and output of data can be done using functions like scanf and printf.
Python is a high-level, interpreted and general-purpose dynamic programming language that focuses on code readability. The syntax in Python helps programmers write code in fewer steps as compared to languages like Java or C++. Character set in Python includes letters, digits, special symbols, and whitespace. Tokens or lexical units are the basic elements identified in a programming language like keywords, identifiers, literals, operators, and punctuators.
This document provides an introduction to C++ programming, covering key concepts like characters, tokens, keywords, identifiers, literals, operators, input/output, variables, comments, and common errors. It explains that C++ was created by Bjarne Stroustrup in the 1980s as an extension of C with object-oriented features from Simula 67.
This document provides an introduction to C++ programming, covering key concepts like characters, tokens, keywords, identifiers, literals, operators, I/O streams, variables, comments, and common errors. It explains that Bjarne Stroustrup extended C to create C++, adding object-oriented features from Simula. The main components discussed are the building blocks of any C++ program - characters, tokens, data types, and basic input/output operations.
This document provides an introduction to C++ tokens, including keywords, identifiers, literals, punctuators, and operators. It discusses the C++ character set and how a program is constructed using different tokens. Key points covered include:
- The basic building blocks of a C++ program are tokens like keywords, identifiers, literals, punctuators, and operators.
- Literals include integer, character, floating, string, and Boolean constants. Punctuators include brackets, parentheses, braces, commas, semicolons, and other special characters.
- The main types of operators are arithmetic, relational, logical, unary, assignment, conditional, and comma operators.
Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) I...GANESHBABUVelu
1. The document discusses various concepts in Java programming including data types, variables, operators, and decision making statements. It describes integer, floating point, character, and boolean data types.
2. It also covers variable declaration and scope, constants, arithmetic, relational, and logical operators. Decision making statements like if and switch statements are used for conditional branching in a program.
3. The document provides examples of declaring and assigning values to variables, using different types of operators to perform calculations and comparisons, and the syntax of if and switch statements.
Constants are fixed values that can be literals like integers, floating point numbers, characters, strings, Boolean values, or pointers. Literals can be classified as integer, floating point, character, string, Boolean, pointer, or user-defined. Integer literals can be decimal, octal, or hexadecimal. Floating point literals support decimals and exponents. Character and string literals are enclosed in single or double quotes. Constants can also be named using the const qualifier.
The document discusses key concepts in C programming including:
1) The life cycle of a C program involving preprocessing, compilation, assembly, linking, and program execution in memory.
2) The structure of a C program including keywords, identifiers, variables, literals, and different variable types.
3) Details about integer, floating point, character, and string literals as well as escape sequences used in C programming.
The document provides information on the C programming language. It discusses that C was developed in 1972 by Dennis Ritchie at Bell Labs. C is a portable, structured programming language known for its ability to extend itself through functions. The document outlines the basic structure of a C program and common elements like variables, data types, operators, and functions. It also provides a brief history of C and how it has become one of the most widely used programming languages.
This document provides an introduction to the C programming language. It discusses what a programming language and computer program are, and defines key concepts like algorithms, flowcharts, variables, data types, constants, keywords, and instructions. It also outlines the basic structure of a C program, including header files, functions, comments, and compilation/execution. The document explains the different character sets and components used to write C programs, such as variables, arithmetic operations, and control structures.
C++ is an object-oriented programming language that is an extension of C. It was developed in the 1980s to support object-oriented programming. In C++, data and functions can be combined into objects. Data in an object can only be accessed by the object's functions, allowing for encapsulation. The document then provides an overview of key C++ concepts like data types, tokens, operators, and input/output streams to introduce basic C++ syntax and programming.
The document discusses the structure and process of a compiler. It has two major phases - the front-end and back-end. The front-end performs analysis of the source code by recognizing legal/illegal programs, understanding semantics, and producing an intermediate representation. The back-end translates the intermediate representation into target code. The general structure includes lexical analysis, syntax analysis, semantic analysis, code generation and optimization phases.
This document provides an introduction to Python fundamentals, including:
1. The Python character set includes letters, digits, symbols, and whitespace. Individual elements are called tokens or lexical units.
2. Keywords, identifiers, literals, operators, and punctuators are the main types of tokens. Identifiers follow specific naming conventions. Literals include strings, numbers, Booleans, None, and collections.
3. Strings can be single or multi-line with escape sequences. Numbers can be integers, floats, or complex. True, False, and None are Boolean and special literals.
This document provides an overview of C# data types, operators, expressions, statements, and other fundamental concepts. It discusses the different primitive data types in C#, including integer, floating-point, boolean, character, and string types. It also covers literals, variables, operators such as arithmetic, logical, comparison, and assignment, and shows examples of using each concept. The document is intended to teach basic C# syntax and semantics.
The document is an RFC that defines the JSON (JavaScript Object Notation) format. It summarizes JSON as:
- A lightweight data interchange format derived from JavaScript that can represent simple data structures and collections of name-value pairs and ordered lists of values.
- JSON is text-based, language independent, and uses conventions similar to C/JavaScript for numbers, strings, arrays, and objects to allow for minimal and portable representation of structured data.
- The RFC specifies the JSON grammar, character encoding, parsing, generation, and defines its media type as application/json for use across different applications and programming languages.
The objective of the Level 5 Diploma in Information Technology is to provide learners with an excellent foundation for a career in a range of organisations. It designed to ensure that each learner is ‘business ready’: a confident, independent thinker with a detailed knowledge of Information Technology, and equipped with the skills to adapt rapidly to change.
This document provides an overview of data structures in 3 paragraphs or less:
Data can be represented in raw form, as data items, or as data structures. A data structure is a collection of different data types that can be processed as a single unit. There are two types of data structures - simple structures built from primitive types like integers and characters, and compound structures that combine simple structures. Common data structures include arrays, stacks, queues, linked lists, and trees. These structures allow grouping of different data types and processing of the group as a single unit, making data management simpler.
This document defines and explains various elementary data representations and data structures. It discusses raw data, data items, and data types. It also defines primitive and non-primitive data types. Different data structures are explained like arrays, structures, stacks, queues, linked lists, and trees. Common operations on data structures like insertion, deletion, searching, traversal, sorting, and merging are also summarized.
This document summarizes key provisions related to taxation and public funds in the Indian Constitution. It discusses Articles 265, 266, 267, 283, and 292 which address topics like no taxation without authority of law, consolidated funds, contingency funds, regulation of public funds, and borrowing by the government of India. The document is intended to provide a basic understanding of the constitutional framework for taxation and public financial management in India.
NITI Aayog was formed in 2015 by the Government of India to replace the Planning Commission as the premier policy think tank of the country. It aims to foster cooperative federalism through structured support initiatives involving both the central and state governments. NITI Aayog does not allocate funds to states and ministries like the Planning Commission did, but takes a bottom-up approach in developing national plans and policies. It also functions as a platform for resolving inter-sectoral and inter-departmental issues to accelerate development.
The World Bank is an international organization owned by 189 member countries that provides loans and grants to developing countries with the goal of reducing poverty. It is governed by member countries through a Board of Governors and Board of Executive Directors. Though not technically a bank, it raises funds through bond sales and member contributions which it uses to finance projects focused on areas like education, health, infrastructure, agriculture and natural resource management in developing nations. The World Bank Group consists of five institutions that provide various types of financing to both governments and private sector entities.
The document discusses good governance. It defines good governance as how public institutions effectively conduct public affairs and manage resources for public benefit. It originated as a concept promoted by the World Bank in 1989 to describe factors necessary for development. Key elements of good governance discussed include participation, rule of law, transparency, responsiveness, equity, effectiveness, efficiency and accountability. The document also discusses Kautilya's views on good governance and highlights that Himachal Pradesh is ranked first among small states in India for quality of governance according to a 2017 survey.
SEBI was established on April 12, 1992 under the Securities and Exchange Board of India Act, 1992. It regulates the securities markets in India and protects investors. SEBI is headquartered in Mumbai and has regional offices across India. It is governed by a board with a chairman and other members appointed by the Indian government. SEBI's functions include registering and regulating intermediaries, regulating takeovers and insider trading, protecting investors, and promoting securities market development. It has powers to inspect entities, impose penalties, and its decisions can be appealed to the Securities Appellate Tribunal or Supreme Court.
Reading provides numerous cognitive, emotional, and social benefits. It increases knowledge by exposing readers to new information and perspectives. Reading improves imagination and creativity by transporting the reader to new fictional worlds. It is also beneficial for stress relief, sharpens critical thinking skills, and boosts vocabulary and communication abilities. Regular reading keeps the mind active and engaged and offers a source of pleasure and lifelong learning.
Thinking is a key ability that distinguishes humans from other species. It involves using tools like images, concepts, symbols, language, and brain functions to solve problems through a process of reasoning. There are different types of thinking including perceptual, conceptual, theoretical, creative, and critical. Errors can occur when thinking is swayed by emotions, biases, prejudices, lack of information, wishful thinking, or failure to consider multiple perspectives. Overcoming these errors requires open-minded, logical thinking based on accurate data rather than mental "sets" from past experiences.
The Pension Fund Regulatory and Development Authority (PFRDA) was established by the Government of India in 2014 to regulate and develop pension funds and protect the interests of subscribers. PFRDA regulates the National Pension System and is headed by a chairman and includes whole-time and part-time members. As the regulator for NPS, PFRDA oversees intermediaries like the Central Record Keeping Agency and pension funds, monitors their performance, and safeguards subscribers' interests.
Motivation is defined as the desires within an individual that stimulate goals and action. There are two types of motivation: intrinsic motivation that comes from within an individual and extrinsic motivation from outside rewards or punishments. Motivation is needed to help people overcome challenges and be creative in problem-solving. Some ways to motivate others include listening to understand their goals, asking open-ended questions, and offering help and encouragement. Motivated individuals are driven, focused, and confident without wasting time comparing themselves to others. Motivation comes from internal and external sources like achievement, incentives, social factors, and fear. Motivation can be increased by celebrating successes, rewarding yourself, and maintaining a positive attitude.
Fiscal policy in India aims to mobilize resources, promote investment and economic development, and achieve social objectives like reducing inequality and poverty. It involves decisions around tax revenue, spending, borrowing, and deficits. While fiscal policy has helped increase investment and savings, it has also faced issues like a reliance on indirect taxes, rising deficits, inflation, and losses in public sector enterprises. Reforms are needed like broadening the tax base, increasing direct taxes, simplifying the tax structure, reducing non-development spending, and improving public sector profitability.
PUNEET GULERIA Q.NO. 14 FINAL ACCOUNTS.docxMukesh Thakur
The document provides accounting information for a business for the year ended December 31, 2010. It includes balances for assets, liabilities, income and expenses. The summary provides income of Rs. 18,205 from sales less returns, expenses of Rs. 11,372 including wages, salaries and purchases. Net profit for the year was Rs. 1,878. The balance sheet as of December 31, 2010 lists total capital and liabilities of Rs. 29,826 including loan, creditors and provisions matched by assets such as stock, debtors and cash.
The document discusses microfinance, which provides small loans and other financial services to poor entrepreneurs and small businesses that lack access to traditional banking. It traces the evolution of microfinance from Muhammad Yunus establishing the Grameen Bank in Bangladesh in 1976 to it becoming a global industry. Microfinance benefits the poor by allowing them to start businesses to support their families and gain access to credit otherwise unavailable to them. It operates by microfinance institutions providing loans, savings, insurance and remittance services to low-income clients.
Speed reading involves rapidly recognizing phrases and sentences rather than individual words. It allows readers to process information more quickly by avoiding sub-vocalization, or saying words in your head. There are three main speed reading methods: 1) the pointer method uses a finger or card to guide reading, 2) the tracker and pacer method uses an underlining pen to increase focus on each line, and 3) scanning previews a page by identifying key words and ideas to grasp the overall concept without reading every word. Speed reading is best for understanding basic arguments but not complex materials, and improves with practice through techniques like avoiding distractions and knowing your reading goal.
The document defines monetary policy as the tool used by central banks to achieve macroeconomic objectives like growth and inflation control. It involves managing money supply and interest rates. The Reserve Bank of India is India's central bank and its Monetary Policy Committee formulates monetary policy through various direct and indirect tools. The key tools discussed are repo rate, reverse repo rate, cash reserve ratio, statutory liquidity ratio, open market operations, and moral suasion. The objectives of Indian monetary policy are price stability, adequate credit flow, controlled credit expansion, and promotion of investment and exports.
The document discusses the definition, causes, symptoms and types of fear. It defines fear as an emotion induced by perceived threats that causes us to withdraw from danger. Fear can also be felt in less dangerous situations like exams, public speaking or new jobs. The document then discusses strategies for coping with fear like being prepared, facing the fear, and maintaining confidence and persistence. It provides examples of common fears like failure, social situations, criticism and death. The conclusion emphasizes that courage requires first acknowledging one's fears in order to gain control over the situation.
Bitcoin is the top-rated cryptocurrency, though it is not considered legal tender in Costa Rica. While some argue bitcoin is a safe investment due to its lack of correlation to the stock market, others believe its price declines signal growing pains as the emerging technology matures and negative media coverage scares away 2017 investors. However, the document argues that emerging technologies always experience difficulties in their early years, and bitcoin will likely continue developing rather than dying out.
The document discusses the Finance Commission of India. Some key points:
- The Finance Commission is an independent body established by the Constitution to define financial relations between the central and state governments.
- It makes recommendations every 5 years on tax revenue sharing, grants to states, and other fiscal transfers to address vertical and horizontal imbalances.
- The Commission considers factors like the fiscal capacity and needs of central/state governments, debt levels, and promoting balanced regional development.
- It has played an important role in ensuring smooth center-state fiscal relations and India's cooperative federal system.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Zilliz
Join us to introduce Milvus Lite, a vector database that can run on notebooks and laptops, share the same API with Milvus, and integrate with every popular GenAI framework. This webinar is perfect for developers seeking easy-to-use, well-integrated vector databases for their GenAI apps.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
20240605 QFM017 Machine Intelligence Reading List May 2024
Programming fundamental
1.
2. JAVA Character Set
Character set is a set of valid characters that a language can recognise.
A Character represents any letter, digit or any other sign.
Java uses the Unicode character set.
Unicode is a two-byte character code set that has characters
representing almost all characters in almost all language and writing
Systems around all the world including English, Arabic, Chinese etc.
3. Token
The smallest individual unit in a program is known as Token.
In a Java program, all characters are grouped into symbols called tokens.
Java has the following types of tokens: keyword , Identifier, literal, punctuators,operators.
lower-case <= a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z
upper-case <= A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z
alphabetic <= lower-case | upper-case
numeric
<= 0|1|2|3|4|5|6|7|8|9
alphanumeric <= alphabetic | numeric
special
<= !|%|^|&|*|(|)|-|+|=|{|}|||~|[|]||;|'|:|"|<|>|?|,|.|/|#|@|`|_
graphic
<= alphanumeric | special
4. Keywords
Keywords are words that have a specific predefined meaning in Java.
They cannot be used as variable names.
These are reserved for special purpose. They are also known as reserve words.
abstract
assert
boolean
break
byte
case
catch
char
class
const
continue goto
package switch
default if
private this
do
implements
protected
throw
double import public throws
else
instanceof
return transient
extends int
short
try
final
interface static
void
finally long
strictfp volatile
float
native super
while
for
new
synchronized
5. Identifiers :
Identifiers are fundamental building blocks of a program and are used as the
General terminology for the names given to differnent parts of the program i.e.
Variables, objects, classes, functions, arrays, packages etc.
Identifiers forming rules of java state the following
1. Identifier can have alphabets, digits and underscore and doller sign characters.
2. They must not be a keyboard or boolean literal or null literal.
3. They must not begin with a digit.
4. They can be of any length.
5. Java is case sensitive.
6. Literals:
Items having fixed data values are referred to as Literals.
They are also known as Constants.
Various types of literals available in Java are :
Integer literals
Floating literals
Boolean literals
Character literals
String literals
Null literals
7. Literals
Literals (often referred to as constants) are data items that never change their value
during a program run.
JAVA allows several kinds of literals:
1. Integer Constant
2. Floating Constant
3. Character Constant
4. String Constant
Literals
8. Integer Constants
Integer constants are whole numbers without any fractional part. The method of writing
integer constants has been specified in the following rule:
An integer constant must have at least one digit and must not contain any decimal
point. It may contain either + or - sign. A number with no sign is assumed to be
positive. Commas cannot appear in an integer constant.
9. JAVA allows three types of integer constants:
1. Decimal (base 10)
2. Octal (base 8)
3. Hexadecimal (base 16)
1. Decimal Integer Constants. An integer constant consisting of a sequence of
digits is taken to be decimal integer constant unless it begins with a (digit zero).
For instance, 1234,41, + 97, -17 are decimal
integer constants.
2. Octal Integer Constants. A sequence of digits starting with 0 (digit zero) is taken
to be an octal integer. For instance, decimal integer 8 will be written as 010 as
octal integer. and decimal integer 12 will be written as 014 as octal integer
3. Hexadecimal Integer Constants. A sequence of digits preceded by Ox or OX is
taken to be an hexadecimal integer. For instance, decimal 12 will be written as oxe
as hexadecimal integer. Thus number 12 will be written either as 12 (as
decimal), 014 (as octal) and oxe (as hexadecimal).
The suffix I or Land u or U attached to any constant forces it to be represented as
a long and unsigned respectively.
10. Character Constants
A character constant is one character enclosed in single quotes. The rule for
writing character constant is given below:
A character constant in JAVA must contain one character and must be
enclosed in single quotation marks.
JAVA allows you to have certain nongraphic characters in character constants.
Nongraphic characters are those characters that cannot be typed directly from
keyboard e.g., backspace, tabs, carriage return etc.
These nongraphic characters can be represented by using escape sequences.
An escape sequence is represented by a backslash () followed by one or more
characters.
11. Following table gives a listing of escape sequences:
a
b
f
n
r
t
v
'
"
?
On
xHn
o
Audible bell (alert)
Backspace
Formfeed
Newline or !inefeed
Carriage Return
Horizontal tab
Vertical tab
Backslash
Single quote
Double quote
Question mark
Octal number (On represents the number in octal)
Hexadecimal number (Hn represents the number in hexadecimal)
Null
12. Floating Constants
Floating constants are also called real
constants.
Real constants are numbers having fractional parts. These may be written in one of the two
forms called fractional form or the exponent form.
A real constant in fraction form consists of signed or unsigned digits including a decimal
point between digits. The rule for writing a real constant in fractional form is given below:
note :-
A real constant in fractional form must have at least one digit before a
decimal point and at least one digit after the decimal point. It may also have either +
or - sign preceding it. A real constant with no sign is assumed to be positive.
The following are valid real constants in fractional form :
2.0, 17.5, - 13.0, - 0.00625
The following are invalid real constants :
7
(No decimal point)
7.
(No digit after decimal point)
+ 17/2
(I-illegal symbol)
17,250.26.2 (Two decimal points)
17,250.262 (comma not allowed)
13. A real constant in exponent form consists of two parts: mantissa and exponent.
For instance, 5.8 can be written as 0.58 x 101 =0.58 an where mantissa part is 0.58
(the part appearing before E) and exponent part is 1 (the part appearing after E). E01
represents ~01. The rule for writing a real constant in exponent formis given below:
A real constant in exponent form has two parts: a mantissa and an exponent.
The mantissa must be either an integer or a proper real constant. The mantissa is
followed by a letter E or e and the exponent. The exponent must be an integer.
The following are the valid real constants in exponent form :
152E05, 1.52E07, 0.152E08, 152.0E08, 152E+8, 1520E04, -O.172E3
The following are invalid real constants in exponent form:
(i) 172.E5
(ii) 1.7E
(At least a digit must follow the decimal point)
(No digit specified for exponent)
(iii) 0.17E2.3
(Exponent can not have fractional part)
(iv) 17,225E02
(No comma allowed)
(v) .25E-7
(No preceding digits before decimal point)
14. terminator character
String Literals
'Multiple Character' constants are treated as string-literals. The rule for writing
string-literal is given below :
A string literal is a sequence of characters surrounded by double quotes
Each character may be represented by an escape sequence.
A string literal is of class type String. And each character takes 2 bytes.
For instance,
"abc" size is 6 bytes.
“ab”
15. Null Literal :
The null type has one value, the null reference represented by the literal null,
Which is formed from ASCII characters.
A null literal is always of the null type.
Separators :
The following nine ASCII character are the separators (punctuators)
() {} [] ;
,
.
16. Operators:
Operators are special symbols that perform specific operations on
one, two, or three operands, and then return a result.
Operators Precedence
postfix expr++ expr
unary ++exprexpr+exprexpr~ !
multiplicative * / %
additive + shift <<>>>>>
relational <><= >= instanceof
equality == !=
bitwise AND &
bitwise exclusive OR ^
bitwise inclusive OR |
logical AND &&
logical OR ||
ternary ? :
assignment = += =*= /= %= &= ^= |= <<= >>= >>>=
17. Data Types
To Identify the type of data and associated operations of handling it.
Java data types are of two types
1) Primitive data types 2) Reference Data Types
18. Primitive Data Types:
A primitive type is predefined by the language and is named by a reserved keyword.
Thus by primitive data types, we mean fundamental data types offered by JAVA.
The eight primitive data types supported by the Java programming language are:
byte: The byte data type is an 8bit signed two's complement integer. It has a
minimum value of -128 and a maximum value of +127 (inclusive).
short: The short data type is a 16bit signed two's complement integer. It has a
minimum value of -32,768and a maximum value of +32,767 (inclusive).
int: The int data type is a 32bitsigned two's complement integer. It has a
minimum value of2,147,483,648and a maximum value of 2,147,483,647 (inclusive).
long: The long data type is a 64bitsigned two's complement integer. It has a
minimum value of 9,223,372,036,854,775,808and a maximum value of
9,223,372,036,854,775,807(inclusive).
19.
float: The float data type is a singleprecision32bitIEEE 754 floating point.
double: The double data type is a doubleprecision64bitIEEE 754 floating point.
boolean: The boolean data type has only two possible values: true and false.
Use this data typefor simple flags that track true/false conditions.
char: The char data type is a single 16bitUnicode character. It has a minimum
value of'u0000' (or 0) and a maximum value of 'uffff ' (or 65,535 inclusive).
Boolean Type :- Boolean data type used to represent a single ture/false value.
a Boolean value can have only one of two values : True or False.
Value
Datatype
Value
178
26.34e2
87.363F
37.266
8864L
37.266D
True
26.77e3
‘c’
false
Datatype
20. Reference Data Types :
Reference data types store the memory address of an object.
Class, Interface and Array are the example of Interface Reference Data types.
A reference is called a pointer or a memory address in other language.
An importance reference type that you are use in JAVA is String type.
The String data type lets you create variables that can hold textual data.
“RAM”, “House_No_68”, “500”, AB56”
21.
22. Variables :
Variable is a named storage locations, which holds a data value of a particular data
Type. And whose value can be manipulated during program run.
Declaration of a variable
The Syntax is
type variable_name;
Example
int age;
double amount;
float marks;
When a more than one identifier of a same type
double salary,wage;
int month,day,year;
Long dis,area;
23. Initialization of Variables :
int salary;
A simple definition does not provide a first value or initial value to the variable i.e.
Variable is uninitialized and the variable’s value is said to be undefined.
A variable with a declared first value is said to be initialised variable.
int salary=30000;
double price=200.50, discount=0.10;
float a=0.20f;
Dynamic initialization
A call to a method, in which case the return value determines the initialization.
For example
int a=10,b=4;
int c=Math.sqrt(a*a + b*b);
System.out.println(“The Result is “ +c);
Default initial value of variables
24. TEXT Interaction in GUI
There are four types of methods
1) getText() 2) parse …..() , 3) setText() 4) JOptionPane.showMessageDialog()
1 ) getText() Method :- Obtaining text from a GUI Component
A getText() method returns the text currently stored in a text based GUI component.
The Swing components that support getText() method include : Text Field, Text Area,
Button, Label,Check Box and Radio Button.
To obtain text from nameTextField, you need to write : nameTextField.getText();
Complete statement to obtain text from nameTextField store in a variable :
25. Parse …. () Methods – Obtaining numbers from a GUI component
Sometimes, you use text type components in a GUI but you intend to use it for
Obtaining numeric values e.g. you may want to read age of a person through a text
Field.
So you need a method that helps you convert this textual data into a numeric type.
There are many parse…..() methods that help you parse string into different numeric
Types.
1)
2)
3)
4)
5)
6)
Byte.parseByte(String s);
Short.parseShort(String s);
Integer.parseInt(String s);
Long.parseLong(String s);
Float.parseFloat(String s);
Double.parseDouble(String s);
First , you have to obtain text from nameTextField by typing a statement like
String str=nameTextField.getText();
After that
int a=Integer.parseInt(str);
26. You can combined code to obtain numeric input from a text field
int a=Integer.parseInt(nameTextField.getText());
System.out.print – NON GUI Output Method
If you write System.out.println(“Hello World”);
If you write
System.out.println(“Hello ”);
System.out.println(“World”);
But if you write
System.out.print(“Hello ”);
System.out.print(“World ”);
27. setText() Method :- Storing text into a GUI component
A setText() method stores or changes text in a text based GUI component.
The Swing components that support setText() method include : Text Field,
Text Area, Button, Label,Check Box and Radio Button.
If you want to change the nameTextField
nameTextField.setText(“Rajeev Verma”);
String str=“Rajeev Verma”
nameTextField.setText(str);
28. JOptionPane.showMessageDialog() Method :- Displaying message in a dialog form
You can produce a basic dialog displaying a message to the user.
The user will see your message with only an “OK” button to close the dialog.
To use this method, you need to perform it in two steps :
1) Firstly, in the source editor, where you type your code, at top most position type the
following line.
import javax.swing.JOptionPane;
2) Now display desired message as per following syntax ;
JOptionPane.showMessageDialog(null, “<Desired message here>”);
for example :
29. Variable Scope :Scope generally refers to the program-region within which a variable is accessible.
The broad rule is : a variable is accessible within the set of braces it is declared in
{
int a;
…….
…………..
}
For example
Public class ex4
{
int x;
x=10;
if(x==10)
{
int y=20;
x=y*2;
}
y=100;
System.out.println(“x is “ +x);
Sytem.out.println(“ y is “ +y);
30. Constants :
If you do not want to change a value during a program run.
With the final keyword
final double pi=3.14;
Advantages of Constants :
1) They make your program easier to read and check for correctness.
2) If a constant needs to be changed all you need to do is change the declaration.
31. Operators in JAVA :The operations are represented by operators and the objects of the operations are
referred to as operands.
Unary operators :Operators that act on one operand are referred to as Unary operators.
1. Unary + :- + precedes an operand.
for example if a=5 then +a means +5
if a =-4
1. 2. Unary - :- - precedes an operand.
for example if a=5 then –a means -5
if a =-4
32. Binary operators :Operators that act upon two operands are referred to as binary operators.
For example :- These operators perform addition, subtraction, multiplication,
and division. These symbols are similar to mathematical symbols.
The only symbol that is different is "%", which divides one operand by another and
returns the remainder as its result.
+ addition operator
- subtraction operator
* multiplication operator
/ division operator
% remainder operator
33. Operator + with Strings
For example
5+6=11
“5” + “6”=“56”
“abc” + “123” = “abc123”
“ “ +5 + “xyz”= “5xyz”
34. Increment/Decrement Operators (+ +, --)
JAVA includes two useful operators not generally found in other computer
languages (except C and C++). These are the increment and decrement
operators,
+ + and - -. The C++ name itself is influenced by the increment operator
+ +. The operator + + adds 1 to its operand, and --subtracts one.
35. However, both the increment and decrement operators come in two
varieties : they may either precede or follow the operand.
The prefix version comes before the operand (as in ++a or --a) and
the postfix version comes after the operand (as in a + + or a --).
The two versions have the same effect upon the operand, but they
differ when they take place in an expression.
36. Working with prefix version:- When an increment or decrement operator
precedes its operand (i.e., in its prefix form), JAVA performs the increment or
decrement operation before using the value of the operand. For example, the
expression .
The prefix increment or decrement operators follow change-then-use rule
i.e., they first change (increment or decrement) the value of their operand.
then use the new value in evaluating the expression
sum = sum + (+ + count) ;
The expression P = P * --N;
37. Working with postfix version:- When an increment or decrement operator
follows its operand and (i.e., in its postfix form), C+ + first uses the value of
the operand in evaluating the expression before incrementing or
decrementing the operand's value.
The postfix increment or decrement operators follow use-then-change rule i.e
.• they first use the value of their operand in evaluating the expression , and
then change (increment or decrement) the operand's value.
For example, the exp
sum = sum + count ++;
The expression P = P * N--;
38. The increment operator + + and decrement operator - - are unary operators
i.e., they operate upon single operand.
39. Evaluate x = + + Y + 2y if y = 6.
Evaluate b= a + + + + + a if a is 10 initially.
Evaluate z = + +x + x+ + if x = 15 initially.
40. Relational Operators
In the term relational operator, relational refers to the relationships
that values (or operands) can have with one another.
Thus, the relational operators determine the relation among different
operands.
JAVA provides six relational operators for comparing numbers and
characters, But they don't work with strings.
If the comparison is true, the relational expression results into the value 1
and to 0, if the comparison is false.
41. The six relational operators are :
< (less than)
<= (less than or equal to)
== (equal to)
> (greater than)
>= (greater than or equal to)
! = (not equal to)
42. Relational Operators
Symbol
==
Name
comparison (equality)
Example
Result
6==5
o i.e. false
Comment
returns boolean truth value (0 for
false, 1 for true).
<
!=
greater than or equal to
Not equal to
6<=5
0
1
6>5
1
0
6>=5
1
5>6
>=
greater than
1
5>6
>
0
5<=6
less than or equal to
6<5
5<6
<=
less than
0
6!=5
0
5!=6
0
returns boolean truth value.
returns boolean truth value.
returns boolean truth value.
returns boolean truth value.
returns boolean truth value.
43. The relational operators have a lower precedence than the arithmetic operators.e
Some tips regarding relational operators.
Do not confuse the = and the == operators.
A very common mistake is to use the assignment operators = in place of the
relational operator == . Do not confuse the testing the operator = = with the
assignment operator (=). e
44. Predict the output of following code segment
int chk = 6 ;
cout « "chk = = 8 is" « chk = = 8 « "n" ;
cout « "chk = 8 is" « chk = 8 « "n" ;
45. Tip :- Avoid equality comparison on floating-point numbers
Floating-point arithmetic is not as exact and accurate as the integer
arithmetic is. For instance, 3 * 5 is exactly 15, but 3.25 * 5.25 is nearly equal to
17.06 (if we are working with number with 2 decimal places). The exact
number resulting from 3.25 * 5.25 is 17.0625.
46. Logical Operators
Relational operators that establish relationships among the values. Logical
operators that refer to the ways these relationships (among values) can
be connected.
C++ provides three logical operators to combine existing expressions.
1)
|| (logical OR)
2)
&& (logical AND)
3)
! (logical NOT)
47. The logical OR operator (||)
The logical OR operator (||) combines two expressions which make its
operands.
The logical OR (||) operator evaluates to true i.e., 1 if either of its operands
evaluate to true.
48. Following are some examples of logical OR operation:
(4 = = 4) || (5 = = 8)
0 || 0
results into 1 (true) because first expression is true.
results into 0 (false) because neither expression is true
(both are 0 i.e., false).
5>8 || 5<2
results into 0 (false) because both expressions are
false.
0 || 8
results into 1 (true) because second expression is true.
49. The logical AND operator (&&)
The logical AND operators, written as &&, also combines two expressions
into one. The resulting expression has the value 1 (true) only if both of the
original expressions (its operands) are true.
50. some examples of AND operator (&&).
(6 = = 3) && (4 = = 4)
results into 0 (false) because first expression is
false.
(4 = = 4) && (8 = = 8)
results into 1 (true) because both expressions
are true.
6<9 && 4>2
results into 1 (true) because both expressions
are true.
6>9 && 5<2
results into 0 (false) because both expressions
are false.
51. The Logical NOT operator ( ! )
The logical NOT operator, written as !, works on single expression or operand
i,e., it is a unary operator. The logical NOT operator (!) negates or reverses the
truth value of the expression following it i.e., if the expression is true, then !
expression is false, and vice versa.
52. some examples of logical NOT operation:
! (5)
results into 0 (false) because 5 is non zero (i.e., true)
! (0)
results into 1 (true) because 0 is zero (i.e., false)
! (5 > 2) results into 0 (false) because the expression 5 > 2 is true
i.e., 1.
! (5 > 9) results into 1 (true) because the expression 5 > 9 is false
i.e., O.
54. JAVA offers special shorthands that simplify the coding of a certain type of
assignment statement.
For example,
a = a + 10 ;
can be written as
a + = 10 ;
The operator pair + = tells the compiler to assign to a the value of a + 10.
This shorthand works for all the binary operators in JAVA (those that require
two operands).
55. The general form of JAVA shorthand is
var = var operator expression
Is same as
var operator = expression
Following are some examples of C+ + shorthands:
x - = 10 ; equivalent to
x =x – 10 ;
x * = 3;
equivalent to
x=x*3;
x /= 2 ;
equivalent to
x = x/2 ;
x % = z ; equivalent to
x=x%z;
56. Conditional Operator ? :
JAVA offers a conditional operator (?:) that stores a value depending upon
a condition. operator is ternary operator i.e., it requires three operands. The
general form of conditional operator ?: is as follows:
expression1 ? expression2 : expression3
If expression1 evaluates to true i.e., 1, then the value of the whole expression is the
value expression2,
otherwise, the value of the whole expression is the value of expression3
57. For Example :result = marks >= 50 ? ' P' : ' F' ;
The identifier result will have value 'P' if the test expression marks >= 50 evaluates
to true (1) otherwise result will have value' F'
A= 4==9 ? 10 : 25
int large = (( a > b ) ? (( a > c ) ? a : c ) : (( b > c ) ? b : c ));
58. An expression is composed of one or more operations. The objects of the
operation(s) are referred to as operands. The operations are represented by
operators. Therefore, operators, constants, and variables are the constituents
of expressions.
DEF. An expression in JAVA is any valid combination of operators,
constants and variables.
The expressions in JAVA can be of any type: arithmetic expression,
relational (or logical expression, compound expression etc.
59. Type of operators used in an expression determine the expression type.
For instance, if expression is formed using arithmetic operators, it is an
arithmetic expression; if an expression relational and/or logical operators, it is
a logical expression. An arithmetic expression always results in a number
(integer or real) and a logical expression always results in a logical value either
TRUE (1) or FALSE (0).
60. Arithmetic Expressions
Arithmetic expressions can either be integer expressions or real expressions.
Sometimes a mixed expression can also be formed which is a mixture of real and
integer expressions.
Integer expressions are formed by connecting integer constants and/or integer
variables using integer arithmetic operators.
The following are valid integer expressions:
const count = 30 ;
int I, J, K, X, Y, Z ;
(a)I
(b) -J
(c) K-X
(d) K + X - Y + count
(e) -J + K * Y
f) J/Z
(g) Z % X
61. Real expressions are formed by connecting real constants and/or real
variables using real arithmetic operators (e.g., % is not a real arithmetic
operator).
The following are valid real expressions :
canst bal = 250.53 ;
float qty, amount, value; double fin, inter ;
(i) qty/amount
(iii) (amount + qty * value) - bal
(v) inter - (qty * value) + fin
(ii) qty * value
(iv) fin + qty * inter
62. The process of converting one predefined type into another is called
Type conversion
JAVA facilitates the type conversion in two forms
1. Implicit type conversion
2. Explicit type conversion
63. (i) Implicit type conversion. An implicit type conversion is a
conversion performed by compiler without programmer's intervention.
An implicit conversion is applied generally whenever differing data
types are intermixed in an expression (mixed mode expression), so as
not to lose information.
The JAVA compiler converts all operands upto the type of the
largest operand, which is type promotion.
64. This is done operation by operation, as described in the following type
conversion algorithm:
1. Otherwise, if either operand is of type double, the other is converted
to double
2.Otherwise, if either operand is float, the other is converted to float.
3 .Otherwise, the integral promotions are performed on both operands.
65. (ii) Explicit type conversion. An explicit type conversion is user-defined
that forces an expression to be of specific type.
The explicit conversion of an operand to a specific type is called type
casting.
66. Type casting in JAVA is done as shown below:
(type) expression
where type is a valid JAVA data type to which the conversion is to be done. For
example, to make sure that the expression (x + y /2) evaluates to type float,
write it as :
(float) (x + y / 2)
67. Assigning a value to a type with a greater range (e.g., from short to long) poses
no problem, however, assigning a value of larger data type to a smaller data
type (e.g., from double to float) may result in losing some precision.
68. There are some other similar potential conversion problems that are listed below
Conversion
Potential Problems
Bigger floating-point type to
smaller floating-point type (e.g.,
double to float)
Loss of precision
Floating point type to integer type
Loss of fractional part.
Bigger integer type to smaller
integer type (e.g., long to short)
Original value may be out of range
for target type. Typically, just
resulting in loss of information.
69. In JAVA, when a mixed expression is evaluated, it is first divided into
component sub-expressions upto the level of two operands and an
operator. Then the type of sub-expression is decided keeping in mind
general conversion rules. Using the results of sub-expressions, the next
higher level of expression is evaluated and its type is determined. This
process is continued till you get the final result of the expression. Example
Evaluate the following JAVA expression:
int a, mb = 2. k = 4 ;
a = mb * 3/4 + k /4 + 8 - mb + 5/ 8;
70. logical Expressions
The expressions that result into 0 (false) or 1 (true) are called logical
expressions. The logical expressions are combination of constants, variables
and logical and relational operators
The following are examples of some valid logical expressions :
(i)x> y
(ii) (y+ z>=(x/ z)
(iii) (a + b>c && (c + d) > a
(iv) (y >x)|| (z < y)
71. An expression is composed of one or more operations. An expression
terminated ; semicolon) becomes a statement. Statements form the smallest
executable unit within a JAVA program.
Statements are terminated with a semicolon.
An assignment statement assigns value to a variable. The value assigned
may be a constant, variable or an expression.
The general form of an assignment statement is as follows :
a = eve;
where a is the variable to whom the value is being assigned and
eve can either be a constant or variable or an expression.
72. Following are some examples of assignment statements:
x = 14;
Y = 3.2;
Z =x + y;
Z = z * x;
A =b + e - d;
The symbol '=' is called the assignment operator.
73. Block
A Block is a group of zero or more statement between balanced braces and
can be used anywhere a single statement is allowed.
If (Character.isUpperCase(aChar))
{
Block
label1.setText(“The Character “ + aChar + “is upper Case”);
}
else
{
Another
label1.setText(“The Character “ + aChar + “is lower Case”);
Block
label1.setText(“Thank You”);
}
74. Null or Empty Statement
The Simplest statement of them all is the empty or null statement
It takes in the following statement
;
A null statement is useful in those instances where the syntax of the language
Requires the presence of a statement but the logic of the program does not.
75. Q.No.1 Given the following code fragment
int ch = 20 ;
System.out.println(++ch);
System.out.println(ch);
i) What output does the above code fragment produce ?
ii) What is the effect of replacing ++ch with ch+1 ?
Q.No.2 What will be the result of following two expression if i = 10 initially ?
I ) ++i <= 10
ii) i++ <= 10
Q.No. 3 Given the two following expressions :
a) val = 3
b) val = = 3
i ) How are these two different ?
Q.No. 4 What output will the following code fragment produce ?
int val, res, n = 1000 ;
res = n + val > 1750 ? 400 : 200 ;
System.out.println(res);
i) if the input is 2000 ii) if the input is 1000 iii) if the input is 500
76. Q. no. 5Given the following set of identifiers :
byte b ; char ch; short sh; int intval; long longval ; float fl;
Identify the datatype of the following expressions :
a) ‘a’ -3 b) intval * langval - ch c) fl + longval / sh
Q.No. 6 Will the value of y be the same for the two cases given below ?
i) y = ++x ii) y = x++
Q.No.7 Consider the following code snippet
int i = 10 ;
int n = i++ % 5 ;
What are the values of i and n after the code is executed ?
Q.No. 8 Which of the following are valid identifiers why/ why not ?
1) Data_rec , _data, 1 data, data 1, my.file, switch, goto, break
Q.No. 9 What would be the output of the following program ?
int a =1 , b =2, c =4;
a = +c + ++b / c;
jTextField1.setText( “ a = “ +String.valueOf(a));
Q.No. 10 What would be the output of the following program ?
int a,b =30;
a = 30/2 * b;
jTextField1.setText( “ a = “ +String.valueOf(a));
77. Q. no. 11 What would be the output of the following program ?
float p = 10.45f;
p= p++ + 1;
jTextField1.setText( “ p = “ +String.valueOf(p));
Q. no. 12 What would be the output of the following program ?
int p=10, k=20;
k = k / ++p;
jTextField1.setText( “ k = “ +String.valueOf(k));
Q. no. 13 What would be the output of the following program ?
int z,x=5,y=-10, a=4,b=2;
z= x++ - --y * b/a;
What number will z in the sample code above contain ?
a) 5
b) 6
c) 10
d) 11
e) 12