Skip to main content

Posts

ইনক্রিমেন্ট, ডিক্রি মেন্ট অপারেটর এর নাড়ি নক্ষত্র খুজি আজকে চলো !!!

হ্যালো প্রোগ্রামার'স। আশা করি সবাই ভালো আছো এবং প্রোগ্রামিং চালিয়ে যাচ্ছো । তোমরা ইতিমধ্যেই সি প্রোগ্রামের বেসিক বেশ কিছু জিনিস শিখে গেছো।আমরা আজকে নতুন একটা অপারেটর শিখবো। (++,--) ইনক্রিমেন্ট, ডিক্রি মেন্ট অপারেটর। নতুন সি প্রোগ্রামারদের জন্য একটা ঝড়ের নাম। চলো একটা মজার গল্পের মাধ্যমে আমরা ইনক্রিমেন্ট, ডিক্রি মেন্ট অপারেটর শিখি।আসো প্রথমেই জানি ইনক্রিমেন্ট, ডিক্রিমেন্ট অপারেটর দেখতে কেমন হয়। মনে প্রশ্ন উদয় হয়েছে এদের কাজ কি! (++) ইনক্রিমেন্ট অপারেটর অপারেন্ডের ভ্যালু ১ বাড়িয়ে দিবে এবং (--) ডিক্রিমেন্ট অপারেটর অপরেন্ডের ভ্যালু ১ কমিয়ে দিবে। এই হলো কাজ। নতুন প্রশ্ন মাথায় আসলো এই অপারেন্ডটা আবার কি জিনিস। অপারেটর যাকে অপারেট করবে সে হলো অপারেন্ড। কঠিন লাগছে? আচ্ছা একটা কিচ্ছা(গল্প) বলি মন দিয়ে শুনো। ধরো তুমার কাছে ৫০০ টাকা আছে আমি তোমাকে আরো ১০০ টাকা দিলাম। ত...

What are variables ? Give the conditions for variables.

keywords: Keywords have fixed meanings and these meanings can not be changed. There are 32 keywords.Some compiler may use additional keywords that must be identified from the C manual. Keywords serve basic building block for a program statement. Such as, auto,break,double etc. All keyword must be written in lowercase. Variables: A variable is a data name that may be used to store data value. A variable may take different value at different times during execution. Some examples are, average,height, class_strength. Conditions for variables: Variable names may consist of letters, digits and the underscore character, subject to the following conditions. (i) Must consist of only letters, digits and underscores. (ii) First character must be an alphabet. Some system permits...

What is keyword and identifier ? Give the rules for identifier.

keywords: Keywords have fixed meanings and these meanings can not be changed. There are 32 keywords.Some compiler may use additional keywords that must be identified from the C manual. Keywords serve basic building block for a program statement. Such as, auto,break,double etc. All keyword must be written in lowercase. Identifers: The names of variables, functions and arrays are identifiers. These are user-defined names and consist of a sequence of letters and digits. Such as, my_num,_ton etc. Rules for identifier: (i) Must consist of only letters, digits and underscores. (ii) First character must be an alphabet or underscore. (iii)only first 31 characters are significant. (iv) Can not use a keyword. (v) Must not contain white spaces. ...

Write shortly about the character set.

Character set: The various category of characters are called the character set. In C, the-characters are grouped into the following categories. (i)Letters. Uppercase A.................Z Lowercase a.................z (ii) Digits. All decimal digits. 0...............9 (iii) SpeCial characters. such as, , comma . period ; semicolon : colon (iv) White spaces. Such as blank spaces, horizontal tab, new line etc. Posted By - Sadia Afrin Hiya

Define information, program, syntax rules or grammar and syntax errors.

Information: After converting or processing the data which may consists of numbers, characters, strings etc to something which is usetul and make much sense to a person is known as information. So, information is the converted or processed form of data. Program: Program is a set of instructions.The task of processingof data is accomplished by executing a sequence of precise instructions called a program. So program executes instructions to perform task which is specified. Syntax rules or grammar: Instructions in a program is written using certain Symbols and words according to some rigid rules known as syntax rules or grammer.Each programming language has its own rules that must be followed strictly when using the language. Syntax errors : Mistakes in using the syntax rules or grammar of a programming language is known as syntax errors. Syntax erro...

Write about various data types of C.

Data types : C language is rich in its data types. ANSI supports three classes of data types. (i) Primary or fundamental data types. (ii) Derived data types. (iii) User-defined data types. All C compilers support five fundamental data types. Namely, integer (int), character (char), floating point (float), double-precision floating point (double) and void. They are described below. Integer types: Integer are whole numbers with a range of values supported by a particular machine. If we use a 16 bit word length, the size of the integer value is limited to the range 32768 to +32767. C has three classes of integer storage, namely short int, int and long int. Short int represents fairly small value than int and int represents fairly small value than long int. Floating point type: Floating p...

What is constant ? Write down briefly about different type of constant ?

Constants: Constants are of fixed values that do not change during the execution of a program. There are various types of constants. The types are illustrated in the following figure. Integer constants: An integer constant refers to a sequence of digits. There are three types of integer constants, namely, decimal integer, octal integer and hexadecimal integer. Decimal integer consists of a set of digits from 0 to 9, preceded by an optional + or - sign. Examples, 123 -321 0 64932 Ocial integer consists of a set of digits from 0 to 7, with a leading 0. Examples, 037 0 0437 0551 A sequence of digits preceded by 0x or 0X is considered as hexadecimal integer. They may also includes letters from A to F or from a to f. The letters represents the numbers from 10 to 15. Examples, 0X2 0x9F 0Xbcd 0x ...