C - Variables
1. Variable in C Programming is called as container to store the data.
2. Variable name may have different data types to identify the type of value stored.
3. Suppose we declare variable of type integer then it can store only integer values.
4. Variable is considered as one of the building block of C Programming which is also called as identifier.
5. A Variable is a name given to the memory location where the actual data is stored.
Following are the types of variable in C :
- Local Variables
- Global Variables
Local Variables
1. Local Variable is Variable having Local Scope.
2. Local Variable is accessible only from function or block in which it is declared.
3. Local variable is given Higher Priority than the Global Variable.
Global Variables
1. Global Variable is Variable that is Globally available.
2. Scope of Global variable is throughout the program [ i.e in all functions including main() ]
3. Global variable is also visible inside function , provided that it should not be re-declared with same name inside function because "High Priority is given to Local Variable than Global".
4. Global variable can be accessed from any function.
Features of C
Fast and Efficient
Programs written in C are efficient and fast. This is due to its variety of data type and powerful operators.
Portable
C is highly portable. This means that programs once written can be run on another machines with little or no modification.
Function and Rich Libraries
C program is basically a collection of functions that are supported by C library. We can also create our own functions and add it to the C library.
Modularity
Modular programming is a software design technique that increases the extent to which software is composed of separate parts called modules.
Easy to Extend
In C, New feature can be added at any time by programmer.
Case Sensitive
It is a case sensitive language, that it can differentiate the character is uppercase or lowercase.
Origin of C
In 1970 a programmer, Dennis Ritchie , created a new language called C.
1. The name came about because it superseded the old programming language he was using : B
2. C was designed with one goal in mind : writing operating system.
3. The language was extremely simple and flexible and soon was used for many different types of programs.
4. It quickly became one of the most popular programming languages in the world.
List of C keywords
Keywords are reserved words which have standard, predefined meaning in C. They cannot be used as program-defined identifiers.
*Generally all keywords are in lowercase although uppercase of same names can be used as identifiers.
List of C keywords are as follows:
- auto
- break
- case
- char
- const
- continue
- default
- do
- double
- else
- enum
- extern
- float
- for
- goto
- if
- int
- long
- register
- return
- short
- signed
- sizeof
- static
- struct
- switch
- typedef
- union
- unsigned
- void
- volatile
- while
These Are The Fastest Growing Programming Languages
A lot of new programming languages are making their way to the top and JavaScript is holding the top position for the past few years. Seems like the situation is about to change and JavaScript may soon be dethroned by Python. Python is one of the fastest growing languages and by 2019, it would have a clear domination in the programming community.
This is a prediction made by Stack Overflow, a programming Q&A center. With more than 50 million amateur and professional developers visiting the website, Stack Overflow is one of the qualified companies to make such a survey. Based on the huge increase in the questions from developers on Python and the data they have collected, Stack Overflow made this survey possible.
Stack Overflow data scientist David Robinson said in a blog post that, “The term ‘fastest-growing’ can be really hard to define precisely, but we make the case that Python has a solid claim to become the fastest-growing major programming language.
Just in the past five years, Python went from least to top six most popular programming languages with a whopping 2.5x increase in the questions and views on the language. Stack Overflow also stated that these statistics are related to developers from countries with “high-income” and represent the trend in the United States, United Kingdom, Canada, Germany and other such countries.
The secret behind the growth of Python is its flexibility and versatility. Python is generally used by web and desktop developers, develops/sysadmin and recently even data scientists and machine-learning with Python became popular.
“It seems like Python is used in every domain — system operations, web development, deployment, scientific modeling, etc etc. There is no other language that is so versatile,” says Jacqueline Kazil, board director of the Python Software Foundation (PSF).
4 Essential Tools for a Java-Centric IT Environment
For those unfamiliar with the modern IT scene, “java” might still conjure up images of coffee mugs filled to the brim. And while that is an essential tool for all IT specialists who work the morning shift, we use “Java” here in reference to the popular programming language originally developed by James Gosling back in 1995 (centuries ago in “IT years!”).
Java, a widely used programming language, is designed for use in the distributed environment of the internet. It is the most popular programming language for Android smartphone applications and for the Internet of Things development.
Java is now used by some 9 million software developers and is especially popular with client-server Web apps. Its flexibility and compatibility with every computer architecture and its inherent simplicity and “smartness” have endeared it to the hearts of millions.
Assuring meticulous performance can be challenging without the right tools. That’s why every Java developer, performance tuner, and end-user needs to be equipped with those tools to ensure the best possible results, including these four:
1. The Best, Most Appropriate Java Profiler
Java profilers can help you with a multitude of programming tasks, including memory usage monitoring, memory leak detection, analyzing method call durations, finding performance bottlenecks, resolving threading problems, displaying helpful graphs and reports, and much more.
2. Bug Finding Tools
To help Java software developers write better code, nothing is more important than an effective, efficient bug finder, like for example FindBugs. FindBugs is an open source tool that utilizes Java bytecode instead of source code. It employs “static analysis” to quickly find numerous types of errors that may be gotten into your Java program.
And besides identifying the exact type of error and its location, FindBugs also gives you an entertaining but still helpful analysis of the severity level of each error: of concern, troubling, scary, and scariest.
3. Auto-build Tools
Given the complexity and length of coding structures in modern Java (and other) software, it is essential to avail yourself of an auto-build tool like Apache Ant to speed things up. Apache Ant is open source, uses XML, and uses Javascript.
In fact, “the ant” actually requires a Java platform and is mostly utilized for Java-based software projects. However, you can also use it for non-Java apps, like with C/C++.
Apache Ant is very flexible and non-restrictive as to coding conventions/layouts, and it will help you to quickly and easily assemble and test-run your Java apps to ensure they are all you want them to be.
4. Data Leakage Protection Software
No matter how careful one is in programming with Java and pre-testing it, in these days of cloud-based data storage, data leaks are much more dangerous than they once were. If files fall into the wrong hands or simply get “lost,” the consequences to companies can be serious indeed as trade secrets are exposed and consumer confidence is shaken. Data leakage protection software can greatly increase the security level of online data that you simply can’t afford to see compromised.
Online Collage Making Competition - Held by IMS Ghaziabad
Support me by reacting to my collage and make me able to win in this competition......
https://www.facebook.com/1433791286762384/photos/a.1433891666752346.1073741827.1433791286762384/1436192816522231/?type=3&theater
Thanking You
Abhishek Gupta
BCA
Structure of C Program
- Documentation Section
- Link Section
- Definition Section
- Global Declaration
main() Function Section
{
Declaration Expressions
}
----------
Sub Program Section
Function 1;
Function 2;
List of JAVA Keywords
- abstract
- boolean
- break
- byte
- switch
- case
- try
- catch
- finally
- char
- class
- continue
- default
- do
- double
- if
- else
- extends
- final
- float
- for
- implements
- import
- instanceof
- int
- interface
- long
- native
- new
- package
- private
- protected
- public
- return
- short
- static
- strictfp
- super
- synchronized
- this
- throw
- transient
- void
- volatile
- while
- goto
- const
Objective Questions of the Day 04/09/17
1. How many cycles per second are in 1Ghz ?
a) 1000
b) 1000000
c) 10000000000
d) 100000
2. Which is not an output device ?
a) Monitor
b) Printer
c) Speaker
d) Mouse
3. How many bits are in a NIBBLE ?
a) 32
b) 16
c) 4
d) 64
4. Where does your PC store your programmes when the power is off ?
a) DRAM
b) Hard Disk
c) Cache
d) Monitor
5. The Capacity of 3.5 inch Floppy Disk is
a) 1.40 MB
b) 1.40 GB
c) 1.44 MB
d) 1.44 GB
a) 1000
b) 1000000
c) 10000000000
d) 100000
2. Which is not an output device ?
a) Monitor
b) Printer
c) Speaker
d) Mouse
3. How many bits are in a NIBBLE ?
a) 32
b) 16
c) 4
d) 64
4. Where does your PC store your programmes when the power is off ?
a) DRAM
b) Hard Disk
c) Cache
d) Monitor
5. The Capacity of 3.5 inch Floppy Disk is
a) 1.40 MB
b) 1.40 GB
c) 1.44 MB
d) 1.44 GB
Need help from my readers?
Hello Friends !!
Good Afternoon ! Will you please help me in solving one
question.......
The question is that - What is the educational qualification required to become an Hacker ......
Please Connect me personally on Facebook ---
Click the given below link......
https://www.facebook.com/CEO.ResumingWindows
Thank You
Stay Connected...
Like My Facebook Page
For interesting knowledgeable quotes, did you knows, daily facts like my page... and share it more and more......
Click here.....
Go through it..
SQL - NOT NULL Constraint
By default, a column can hold NULL values.
The NOT NULL constraint enforces a column to NOT accept NULL values.
This enforces a field to always contain a value, which means that you cannot insert a new record, or update a record without adding a value to this field.
The following SQL ensures that the "ID", "LastName", and "FirstName" columns will NOT accept NULL values:
Example
CREATE TABLE Persons (
ID int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255) NOT NULL,
Age int
);
Try it Yourself »
Tip: If the table has already been created, you can add a NOT NULL constraint to a column with the ALTER TABLE statement.
SQL - Date Functions
Function | Description |
---|---|
NOW() | Returns the current date and time |
CURDATE() | Returns the current date |
CURTIME() | Returns the current time |
DATE() | Extracts the date part of a date or date/time expression |
EXTRACT() | Returns a single part of a date/time |
DATE_ADD() | Adds a specified time interval to a date |
DATE_SUB() | Subtracts a specified time interval from a date |
DATEDIFF() | Returns the number of days between two dates |
DATE_FORMAT() | Displays date/time data in different formats |
SQL - Aggregate Functions
SQL aggregate functions return a single value, calculated from values in a column.
Function | Description |
---|---|
AVG() | Returns the average value |
COUNT() | Returns the number of rows |
FIRST() | Returns the first value |
LAST() | Returns the last value |
MAX() | Returns the largest value |
MIN() | Returns the smallest value |
ROUND() | Rounds a numeric field to the number of decimals specified |
SUM() | Returns the sum |
Thanks My Reader for 50K TARGET
Thanks a lot.....
for reading my blog....
getting me reach to this target of 50K.
BJP Presented By : Yaar No Technology
Congratulations to all BJPians
Q2. Consider the following code snippet:
int number = 14;
if (number >= 10;
{
if (number == 10)
jLabel1.setText("first string");
else
jLabel1.setText("second string");
jLabel2.setText("third string");
}
What will be the output of the following code snippet:
Q1. Identify the error(s) in the following code fragment
switch(ch)
{
case 'a':
case 'A':
case 'e':
case 'E':
case 'i':
case 'i':
break;
default : ch = 'N';
break;
}
Comment your answers fast......
Give me your answers.....
In the above code fragment errors are:
i) The variable ch is uninitialised.
ii) The switch statements two case constants are
identical : case 'i' and case 'i'.
The case constant must have different value.
SQL - INSERT INTO SELECT Examples
Copy only a few columns from "Suppliers" into "Customers":
Example
INSERT INTO Customers (CustomerName, Country)
SELECT SupplierName, Country FROM Suppliers;
Try it Yourself »
Copy only the German suppliers into "Customers":
Example
INSERT INTO Customers (CustomerName, Country)
SELECT SupplierName, Country FROM Suppliers
WHERE Country='India';
Try it Yourself »SQL - SELECT INTO Examples
Create a backup copy of Customers:
SELECT *
INTO CustomersBackup2017
FROM Customers;
Use the IN clause to copy the table into another database:
SELECT *
INTO CustomersBackup2017 IN 'Backup.mdb'
FROM Customers;
Copy only a few columns into the new table:
SELECT CustomerName, ContactName
INTO CustomersBackup2017
FROM Customers;
Copy only the German customers into the new table:
SELECT *
INTO CustomersBackup2017
FROM Customers
WHERE Country='India';
Copy data from more than one table into the new table:
SELECT Customers.CustomerName, Orders.OrderID
INTO CustomersOrderBackup2017
FROM Customers
LEFT JOIN Orders
ON Customers.CustomerID=Orders.CustomerID;
Tip: The SELECT INTO statement can also be used to create a new, empty table using the schema of another. Just add a WHERE clause that causes the query to return no data:
SELECT *
INTO newtable
FROM table1
WHERE 1=0;
SQL - SELECT INTO Syntax
We can copy all columns into the new table:
SELECT *
INTO newtable [IN externaldb]
FROM table1;
Or we can copy only the columns we want into the new table:
SELECT column_name(s)
INTO newtable [IN externaldb]
FROM table1;
The new table will be created with the column-names and types as defined in the SELECT statement. You can apply new names using the AS clause.
Subscribe to:
Posts (Atom)