TCCI-Tririd Computer Coaching Institute is focused on providing Quality education with practical sessions.Satisfaction of our student is our priority. We pride ourselves for providing proficient IT solutions. We have a highly qualificated and expereinced faculties, who, not only handle teaching, but also aspire to provide the best possible solution through their technical expertise.
Tuesday, November 13, 2018
Monday, November 12, 2018
Array in C++-tccicomputercoaching.com
Array is collection of more than one data at same location of same type.
Syntax:
data type name[size];
This will create memory of specified size -data.
For example, an array containing 4 integer values of type
int rn[4];
In array memory always start from 0.
By default, regular arrays of local scope (for example, those
declared within a function) are left uninitialized. This means that none of
its elements are set to any particular value; their contents are
undetermined at the point the array is declared.
But the elements in an array can be explicitly initialized to specific values when it is declared, by enclosing those initial values in braces {}. For example:
Call us @ 98256 18292.
Visit us @ http://tccicomputercoaching.com/
Syntax:
data type name[size];
This will create memory of specified size -data.
For example, an array containing 4 integer values of type
int
called rn could be represented as:
int rn[4];
3
|
2
|
1
|
0
|
In array memory always start from 0.
Initializing arrays
But the elements in an array can be explicitly initialized to specific values when it is declared, by enclosing those initial values in braces {}. For example:
|
int
|
Accessing the values of an array
marks[2] = 75;
EXAMPLE
#include <iostream>
usingnamespacestd;
int MARKS[] = {16, 2, 77, 40, 12071};
int n, result=0;
int main ()
{
for( n=0 ; n<5 ; ++n )
{
result += foo[n];
}
cout << result;
return0;
}
To learn more about
C++ at TCCI
,
Engineering class
,
EC Engineering class
,
civil engineering class
,
computer engineering class
Call us @ 98256 18292.
Visit us @ http://tccicomputercoaching.com/
List in Python-tccicomputercoaching.com
The simplest data structure in Python and is used to store a list of
values.
Lists are collections of items (strings, integers, or even other lists).
Each item in the list has an assigned index value.
Lists are enclosed in [ ]
Each item in a list is separated by a comma
Lists are collections of items (strings, integers, or even other lists).
Each item in the list has an assigned index value.
Lists are enclosed in [ ]
Each item in a list is separated by a comma
Unlike strings, lists are mutable, which means they can be changed.
Examples:
emptyList = [ ]
list1 = ['one, two, three, four, five']
numlist = [1, 3, 5, 7, 9]
mixlist = ['yellow', 'red', 'blue', 'green', 'black']
An empty list is created using just square brackets:
list = []
Methods in List:
| Method | Description |
| Python List append() | Add Single Element to The List |
| Python List extend() | Add Elements of a List to Another List |
| Python List insert() | Inserts Element to The List |
| Python List remove() | Removes Element from the List |
| Python List index() | returns smallest index of element in list |
| Python List count() | returns occurrences of element in a list |
| Python List pop() | Removes Element at Given Index |
| Python List reverse() | Reverses a List |
| Python List sort() | sorts elements of a list |
| Python List copy() | Returns Shallow Copy of a List |
| Python List clear() | Removes all Items from the List |
| Python any() | Checks if any Element of an Iterable is True |
| Python all() | returns true when all elements in iterable is true |
| Python ascii() | Returns String Containing Printable Representation |
| Python bool() | Converts a Value to Boolean |
| Python enumerate() | Returns an Enumerate Object |
| Python filter() | constructs iterator from elements which are true |
| Python iter() | returns iterator for an object |
| Python list() Function | creates list in Python |
| Python len() | Returns Length of an Object |
| Python max() | returns largest element |
| Python min() | returns smallest element |
| Python map() | Applies Function and Returns a List |
| Python reversed() | returns reversed iterator of a sequence |
| Python slice() | creates a slice object specified by range() |
| Python sorted() | returns sorted list from a given iterable |
| Python sum() | Add items of an Iterable |
| Python zip() | Returns an Iterator of Tuples
|
To learn more about python Connect with TCCI , Ahmedabad
TCCI provides online coaching for Python.
To know more about Computer Course at TCCI, Engineering Course at TCCI
Visit us @ http://tccicomputercoaching.com/
Sunday, November 11, 2018
Coaching for EC,EEE and Electrical Engineering-tccicomputercoaching.com
Tuesday, November 6, 2018
Which one is better for a beginner, C++ or Java?tccicomputercoaching.com
First start from C, then C++, then Java.
Even if you wish to have Java as your primary programming language you must give some time to C & C++, may be a month to C & then two months to C++, you'll have pretty good command over the basics of programming, then move towards Java.
Because Java gives you so many things pre-built in you will not get much of the basic to practice, so it won't be a healthier step to go with java directly.
To learn c++ and Java programming Language at TCCI .
Call us 98256 18292.
Visit us @ http://tccicomputercoaching.com/
Even if you wish to have Java as your primary programming language you must give some time to C & C++, may be a month to C & then two months to C++, you'll have pretty good command over the basics of programming, then move towards Java.
Because Java gives you so many things pre-built in you will not get much of the basic to practice, so it won't be a healthier step to go with java directly.
To learn c++ and Java programming Language at TCCI .
Call us 98256 18292.
Visit us @ http://tccicomputercoaching.com/
Monday, November 5, 2018
Static and Dynamic Typing-tccicomputercoaching.com
Data Types are always important in any
programming Language
.
Let us understand through an example:
If we write direct a=10;
There will be an error.
Because user has to inform compiler about data type of data before use them in code.
All most all Languages have this feature. Some are exceptional which don't require to declare data type before use.
Static" and "dynamic" are the types of "typing" that we shall see in the sections that follow.
Languages that have static typing or dynamic typing are said to be "static typed" or "dynamic typed".
What is static typing? And what’s dynamic typing?
Static typing does not imply that you have to declare all the variables first, before you use them;
/* C code */
static int num, sum; // explicit declaration
num = 5; // now use the variables
sum = 10;
sum = sum + num;
/* Python code */
num = 10 // directly using the variable
A lot of people define static typing and dynamic typing with respect to the point at which the variable types are checked. Using this analogy, static typed languages are those in which type checking is done at compile-time, whereas dynamic typed languages are those in which type checking is done at run-time.
To learn more about Type- Checking
Connect with us @ TCCI Computer Coaching in Bopal-Satellite,Ahmedabad
Call us 98256 18292.
Visit us @ http://tccicomputercoaching.com/
Let us understand through an example:
If we write direct a=10;
There will be an error.
Because user has to inform compiler about data type of data before use them in code.
All most all Languages have this feature. Some are exceptional which don't require to declare data type before use.
Static" and "dynamic" are the types of "typing" that we shall see in the sections that follow.
Languages that have static typing or dynamic typing are said to be "static typed" or "dynamic typed".
What is static typing? And what’s dynamic typing?
Static Typing
Static typed programming languages are those in which variables need not be defined before they’re used. This implies that static typing has to do with the explicit declaration (or initialization) of variables before they’re employed. Java is an example of a static typed language; C and C++ are also static typed languages. Note that in C (and C++ also), variables can be cast into other types, but they don’t get converted; you just read them assuming they are another type.Static typing does not imply that you have to declare all the variables first, before you use them;
/* C code */
static int num, sum; // explicit declaration
num = 5; // now use the variables
sum = 10;
sum = sum + num;
Dynamic Typing
Dynamic typed programming languages are those languages in which variables must necessarily be defined before they are used. This implies that dynamic typed languages do not require the explicit declaration of the variables before they’re used. Python is an example of a dynamic typed programming language, and so is PHP. Consider the following example:/* Python code */
num = 10 // directly using the variable
A lot of people define static typing and dynamic typing with respect to the point at which the variable types are checked. Using this analogy, static typed languages are those in which type checking is done at compile-time, whereas dynamic typed languages are those in which type checking is done at run-time.
To learn more about Type- Checking
Connect with us @ TCCI Computer Coaching in Bopal-Satellite,Ahmedabad
Call us 98256 18292.
Visit us @ http://tccicomputercoaching.com/
Subscribe to:
Posts (Atom)




