Vision and dreams are the blueprints of soul and achievements.
-Mohammed Ahmed F

Ethical Hacking Workshop @ HCL

Ethical Hacking Workshop @ HCL

Folks,

POST ON REQUEST by Salman 3rd Year:

Tomorrow HCL Velacherry branch is conducting a workshop on Ethical Hacking and the faculty will be from Anna university.

The cost of this workshop is Rs. 500/-.

Workshop timings is 10 am to 4pm. Total 6hrs, includes break.

Certificate is given.

The workshop will be useful because of HCL and Anna University's faculty has tied up for this.

If you are interested in this workshop then revert to Salman @ +91-8807387807 by tonight.

Miximum strength is 30 students. 21 filled. Only 9 seats left.

-Chief Administrative Officer.
Multiply without using * Operator

Multiply without using * Operator

Folks,

Here is another program from the series tricky code. Here I am going to show you how we can do Multiplication without using Multiply Operator *. You will rarely get this kind of programs.

Comment below to express your feeling and suggest me a new idea for more tricky code.

Logic of the code:

First you give a try to think the logic.

Code:

//C Program for Multiplication without Using Multiply Operator *

‪#‎include‬<iostream.h>

#include<conio.h>
void main()
{
int n, m, s=0;
clrscr();
cout <<"Enter the values";
cin>>n>>m;
while(m!=0)
{
s=s+n;
m--;
}
cout <<"Result = "<<s;
getch();
}


Here is the answer,

Let a and b be two variables then c=a*b. We take 9 as a and 8 as b then c=72.

In other word we are adding 9, 8 times or adding 9, 8 times, so simple logic.

This is what I converted into program.

Submit your own source code in the 'Contact Us' page or else herein the comment box of this post.

-Chief Administrative Officer.
Difference between C++ and Java

Difference between C++ and Java

Java is a true and complete object oriented language.
C++ is an extension of C with object oriented behavior. C++ is not a complete object oriented language as that of Java.

Java does not provide template classes.
C++ offers Template classes.

Java supports multiple inheritance using interface.
C++ achieves multiple inheritance by permitting classes to inherit from multiple classes.

Java does not provide global variables.
Global variables can be declared in C++.

Java does not support pointers.
C++ supports pointers.

In Java, destruction of objects is performed in finalize method.
In C++, destruction of objects is performed by destructor function.

Java doesn’t provide header files but imports packages.
C++ has header files.
Basics of C++

Basics of C++

Today we will see the basics of C++:

When we consider a C++ program it can be defined as a collection of objects that communicate via invoking each others methods.

Let us now briefly look into what do class, object, methods and instant variables mean.

Object - Objects have states and behaviors.

Example: A dog has states-color, name, breed as well as behaviors -wagging, barking, eating. An object is an instance of a class.

Class - A class can be defined as a template/ blue print that describe the behaviors/states that object of its type support.

Methods - A method is basically a behavior. A class can contain many methods.

It is in methods where the logics are written, data is manipulated and all the actions are executed.

Instant Variables - Each object has its unique set of instant variables. An object's state is created by the values assigned to these instant variables.

C++ Program Structure:

Let us look at a simple code that would print the words Hello World.

#include <iostream>

using namespace std;
// main() is where program execution begins.
int main()
{
   cout << "Hello World"; // prints Hello World
   return 0;
}


Let us look various parts of the above program:

The C++ language defines several headers, which contain information that is either necessary or useful to your program.

For this program, the header <iostream> is needed.

The line using namespace std; tells the compiler to use the std namespace. Namespaces are a relatively recent addition to C++.

The next line // main() is where program execution begins. is a single-line comment available in C++.

Single-line comments begin with // and stop at the end of the line.

The line int main() is the main function where program execution begins.

The next line cout << "This is my first C++ program."; causes the message "This is my first C++ program" to be displayed on the screen.

The next line return 0; terminates main() function and causes it to return the value 0 to the calling process.

Make sure that g++ is in your path and that you are running it in the directory containing file hello.cpp.

You can compile C/C++ programs using makefile.

Semicolons & Blocks in C++:

In C++, the semicolon is a statement terminator. That is, each individual statement must be ended with a semicolon. It indicates the end of one logical entity.

For example, following are three different statements:

x = y;

y = y+1;
add(x, y);


A block is a set of logically connected statements that are surrounded by opening and closing braces.

For example:
{

   cout << "Hello World"; // prints Hello World
   return 0;
}


C++ does not recognize the end of the line as a terminator. For this reason, it does not matter where on a line you put a statement.

For example:

x = y;

y = y+1;
add(x, y);


is the same as

x = y; y = y+1; add(x, y);

C++ Identifiers:

A C++ identifier is a name used to identify a variable, function, class, module, or any other user-defined item. An identifier starts with a letter A to Z or a to z or an underscore (_) followed by zero or more letters, underscores, and digits (0 to 9).

C++ does not allow punctuation characters such as @, $, and % within identifiers.

C++ is a case sensitive programming language. Thus, "Manpower" and "manpower" are two different identifiers in C++.

Here are some examples of acceptable identifiers:

mohd

zara
abc
move_name
a_123
myname50
_temp
j
a23b9
retVal


Whitespace in C++:

A line containing only whitespace, possibly with a comment, is known as a blank line, and C++ compiler totally ignores it.

Whitespace is the term used in C++ to describe blanks, tabs, newline characters and comments.

Whitespace separates one part of a statement from another and enables the compiler to identify where one element in a statement, such as int, ends and the next element begins.

Therefore, in the statement,

int age;

There must be at least one whitespace character (usually a space) between int and age for the compiler to be able to distinguish them. On the other hand, in the statement

fruit = apples + oranges;   // Get the total fruit

No whitespace characters are necessary between fruit and =, or between = and apples, although you are free to include some if you wish for readability purpose.
Reverse all words but not the string using pointer

Reverse all words but not the string using pointer

To write a C program to accept a string from the user and reverse all words but not the string using pointer.

String: sihT sI A dooG golB
Result: This Is A Good Blog


Solution:-

//C program for reverse all words but not the string using pointer

‪#‎include‬<stdio.h>
#include<conio.h>
int main()
{
char str[30];
char *p,*tmp;
printf("Enter any string: ");
gets(str);
for(p=str; *p!='\0'; p++)
{
if(*(p+1)==' ' || *(p+1)=='\0')
{
for(tmp=p; *tmp!=' ' && tmp>=str; tmp--)
printf("%c",*tmp);
}
printf(" ");
}
getch();
return 0;
}
Kindly note...

Kindly note...

Folks,

Android App is coming up for the Department of Computer Applications.

Department of Computer Applications will be the first department in the India to have an Android App for its department and also in our college as well! Wow!

Any suggestion / request to include something in the App?

Kindly comment on this post or send us a mail to 'interact2innovate@yahoo.com' or post your suggestions or comments on our fan page on Facebook - Click here to post

-Chief Administrative Officer.
Please don't buy this book

Please don't buy this book

Brief Description:

This is one of the self-development or personality development books available in the store. This has nothing extra or special in context to tell about, but the way it is presented and easy language makes it attractive. You can see the same essence which you see in 'You Can Win' or those of Dale Carnegie's collections. If you are someone who is lazy to read hundreds of pages, then this is for you.


Review:

When asked about the negative title given to the book, the author have beautifully told that this book has nothing  new and what others have told before is being re framed with catchy ingredients. Yes, I would say that there is nothing special or new in this book, but this is the book which I loved a lot after my all time favorite "How to Win Friends and Influence People " by Dale Carnegie.

When speaking in the marketing point of view I also learned that titles like this will definitely attract people to buy this. I too bought this just because of the title. So it not only taught me some basic development skills but also some marketing techniques.

It is always not possible to follow all the skills which a books says you to possess. But if a book can make you remember something whenever the occasions occur then I feel that it is the actual success of the book. There are few contexts which almost embedded into daily life which I would like to quote here,

"Don't try to expose yourself to someone who would have insulted you and is not bothered about whoever you are".

E.g., You may be a state topper in school or a renowned scientist, but in several situations may be when you go for a walk some unknown person may shout at you saying stupid for an accidental mistake. Here there is no use is explaining to him that you are a genius and not a stupid.

Actually the author has quoted this in the very first chapter by quoting an incident in Albert Einstein's life. Similarly few other quotes like combing the hair in a new way and travelling to office in a new direction can too have a some positive effects in your life and make you to love the day.

I would recommend you strongly to buy this book.


Where to buy:

SixthSense Publications,
29/ (7/3) ''E'' Block, Ist Floor,
Madley Road, T.Nagar,
Chennai - 600017
Ph: 65279654 / 24342771
Email : sixthsensepub@yahoo.com

Price : Rs.60/-.

The price is as per the 6th edition released in September, 2009.

-Chief Administrative Officer.
Introduction to Variables and Constants

Introduction to Variables and Constants

Variables and constants

What are variables?

Variables in C are memory locations that are given names and can be assigned values. We use variables to store data in memory for later use. There are 2 basic kinds of variables in C which are numeric and character.

Numeric variables

Numeric variables can either be integer values or they can be Real values. Integer values are whole numbers without a fraction part or decimal point in them. Real numbers can have a decimal point in them.

Character variables

Character variables are letters of the alphabet as well as all characters on the ASCII chart and even the numbers 0 - 9. Characters must always be put between single quotes. A number put between single quotes is not the same thing as a number without them.

What are constants?

The difference between variables and constants is that variables can change their value at any time but constants can never change their value. Constants can be useful for items such as Pi or the charge on an electron. Using constants can stop you from changing the value of an item by mistake.

Declaring variables

To declare a variable we first put the type of variable and then give the variable a name.

You can name a variable anything you like as long as it includes only letters, numbers or underscores and does not start with a number.

It is a good idea to keep your variable names less than 32 characters long to save time on typing them out and for compiler compatibility reasons. Variables must always be declared at the top before any other commands are used.

Now let's declare an integer variable called a and a character variable called b.


int main()

{
   int a;
   char b;
   return 0;
}


You can declare more than one variable at the same time in the following way:


int main()

{
   int a,b,c;
   return 0;
}

To declare a constant all you have to do it put the word const in front of a normal variable declaration and make assign a value to it.


int main()

{
   const float pi = 3.14;
   return 0;
}

Signed and unsigned variables

The difference between signed and unsigned variables is that signed variables can be either negative or positive but unsigned variables can only be positive. By using an unsigned variable you can increase the maximum positive range.

When you declare a variable in the normal way it is automatically a signed variable.

To declare an unsigned variable you just put the word unsigned before your variable declaration or signed for a signed variable although there is no reason to declare a variable as signed since they already are.


int main()

{
   unsigned int a;
   signed int b;
   return 0;
}

Using variables in calculations

To assign a value to a variable you use the equals sign.


int main()

{
   int a;
   char b;
   a = 3;
   b = 'H';
   return 0;
}

There are a few different operators that can be used when performing calculations which are listed in the following table:

Operator Operation


+ Addition

- Subtraction
* Multiplication
/ Division
% Modulus (Remainder of integer division)

To perform a calculation you need to have a variable to put the answer into. You can also use both variables and normal numbers in calculations.


int main()

{
   int a,b;
   a = 5;
   b = a + 3;
   a = a - 3;
   return 0;
}

Reading and printing variables

You can read a variable from the keyboard with the scanf command and print a variable with the printf command.


#include<stdio.h>

int main()
{
   int a;
   scanf("%d",&a);
   a = a * 2;
   printf("The answer is %d",a);
   return 0;
}

The %d is for reading or printing integer values and there are others as shown in the following table:


%d or %i int

%c char
%f float
%lf double
%s string

-Chief Administrative Officer.

About this blog

Folks,

This is our new poster about our blog. Thanks for your visits. You made this blog as a blog reader.

We hope that the informations given herein this blog are useful for you.


-Chief Administrator Officer.