Conventional programming using high-level languages such as COBOL, FORTRAN, and C is commonly known as procedural-oriented programming(POP). In the procedure-oriented approach, the program is viewed as a sequence of things to be done such as reading calculating, and printing.
Difference between array and pointer.
Pointers are used to manipulate data using the address. Pointer use* operator to access the data pointer. The array uses subscription variables to access and manipulate data. Array variables can be equivalently written using a pointer expression.
What are the advantages of the function?
- Module programming is achieved, which makes the program structure more readable.
- Debugging is easier due to modularity.
- It is easier to understand the logic involved in the program.
- Testing is easier.
- Irrelevant details from the user’s point of view are hidden in functions.
- Helpful in generalizing the program.
What is a null pointer?
There are times when it’s necessary to have a pointer that doesn’t pointer anything. The macro NULL, defined in <stddef.h>, has a value, that’s generated to be different from any valid pointer. NULL is a literal zero, the possible cost to void* or char*.
How can you convert a number to a string?
We can convert numbers to strings using a built-in function into a().
What is the difference between #include<file> and #include”file”?
The common way is to surround the file you want to include with the angled brackets<and>. This method of inclusion tells the processor or look for the file in the predefined default location. If the file is still not found, the preprocessor checks the current directory.
The second way to include files is to surround the file you want to include with double quotation marks. This method of inclusion tells the preprocessor to look for the file in the current directory first, and then look for it in the predefined locations you have set up.
The #include<file> method of file inclusion is offered to include nonstandard header files that you have created for use in your program. This is because these headers are often modified in the current directory, and you will want the pre-processor to use your newly modified version of the header rather than the older, unmodified version.
Why n++ executes faster than n+1?
The expression faster a single machine instruction such as INR to carry out the increment operation whereas, n+1 requires more instruction to carry out this operation.
What is a dangling pointer?
A dangling pointer arises when you use the address of an object after its lifetime is over. This may occur in situations like returning the address of the automatic variable from a function or using the address of the memory block after it is freed.
State the advantages and disadvantages of recursion.
Advantage:
- the advantage of recursion is that it reduces program code, thus making it simpler.
- It works well for computation, which are larger in depth.
Disadvantage:
- If the stopping rule is not correctly implemented, then the function may extend into an infinite loop giving us an erroneous output.
- The performance of recursion degerds for computation, which are larger in breadth.
Short name | Full name |
ALU | Artihmatic Logic Unit |
AM | Amplitude Modulation |
ANSI | American National Standard Institute |
ASCII | American National Code For Information Interchange |
ATM | Automatic Teller Machine |
BASIC | Beginners All-purpose Symbols Instruction Code |
BCD | Binary Coded Decimal |
BSNL | Bharat Sanchar Nigam Limited |
CD | Compact Disk |
CD-R | CD-Recordable |
CD-ROM | Compact Disk-Read Only Memory |
CISC | Complex Instruction Set Computer |
COBOL | Common Business Oriented Language |
CPS | Characters Per Second |
CPU | Central Processing Unit |
CRT | Cathods-Ray Tube |
CSCW | Computer Supported Cooperative Working |
DNA | Digital Network Architecture |
EBCDIC | Extended Binary-Coded Decimal Interchange Code |
EDVAC | Electronic Discrete Variable Automatic Computer |
EEPROM | Electrically EPROM |
EPROM | Erasable Programmable Read-Only Memory |
FAT | File Allocation Table |
FM | Frequency Modulation |
FMS | File Management System |
GB | Giga Byte |
FORTRAN | Formula Translation |
GUI | Garphical User Interface |
GIGO | Garbage In-Garbage-Out |
HP | Hewlett Packard |
HTML | Hyper Text Markup Labguage |
HTTP | Hyper Text Transport Protocol |
I/O | Input and Output |
IBM | International Business Machiness |
IC | Integrated Circuit |
IEEE | Institute of Electrical And Electronics Engineers |
ISO | International Standards Organization |
KB | Kilo Bytes |
LAN | Local Area Network |
LCD | Liquid Crystal Display |
WAN | Metropolitan Area Network |
MB | Mega Bytes |
Ms-Dos | Microsoft Disk Operating System |
OS | Operating System |
OSI | Open System Interconnection |
PC | Personal Computer |
PM | Phase Modulation |
POS | Poind-Of-Sale |
PROM | Programmable Read-Only Memory |
RAM | Random Access Memory |
RISC | Reduced Instruction Set Computer |
ROM | Read Only Memory |
TDM | Time-Division Multiplexing |
UNIVAC | Universal Automatic Computer |
VAN | Value Added Network |
VCR | Video Cassette Reorder |
VSNL | Videsh Sanchar Nigam Limited |
WAN | Wide Area Network |
WORM | Write-Once Read Many |
WYSIWYG | What You See Is What You Get |
WWW | World Wide Web |
Describe the four basic data types.
Primary data type:
- Integer (int)
- Character (char)
- Floating Point(float)
- Double Precision floating point(double)
This type of data type may be expended using a long qualifier line long int.
User-defined data type:
The user or programmer defines this type of data type. The type of or enum keyword defines it.
Ex: typed of int number- enum day(Monday, Tuesday, Wednesday……Sunday);
Derived data type:
the Ierived data type is developed by a combination of basic data types.
Ex: Structure, Array
Empty data type:
[Void data type]
What is C-token?
The smallest individual units of a c program are known as tokens.
Ex: Keyword, Identifier.
What are Identifiers?
The identifiers used for naming programs are eliminated like variable names and symbols defined by the user.
Ex: Variable name, function name symbolic constant name.
What are the rules for naming and identifiers?
- An identifier must begin with the letter and must be followed by letters and digits.
- The only special symbols underscore (“______”) are permitted and considered as a letter.
- The name of identifiers can not be any one of the reserver words or keywords.
- The C language is case-sensitive.
What are the keywords?
The keywords serve as the basic building blocks for program statements the c-key words must be written in lowercase. The meaning of keywords is fixed by the compiler.
Ex: int, float.