High-level language and low-level language

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?

  1. Module programming is achieved, which makes the program structure more readable.
  2. Debugging is easier due to modularity.
  3. It is easier to understand the logic involved in the program.
  4. Testing is easier.
  5. Irrelevant details from the user’s point of view are hidden in functions.
  6. 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:

  1. the advantage of recursion is that it reduces program code, thus making it simpler.
  2. It works well for computation, which are larger in depth.

Disadvantage:

  1. If the stopping rule is not correctly implemented, then the function may extend into an infinite loop giving us an erroneous output.
  2. The performance of recursion degerds for computation, which are larger in breadth.
Short nameFull name
ALUArtihmatic Logic Unit
AMAmplitude Modulation
ANSIAmerican National Standard Institute
ASCIIAmerican National Code For Information Interchange
ATMAutomatic Teller Machine
BASICBeginners All-purpose Symbols Instruction Code
BCDBinary Coded Decimal
BSNLBharat Sanchar Nigam Limited
CDCompact Disk
CD-RCD-Recordable
CD-ROMCompact Disk-Read Only Memory
CISCComplex Instruction Set Computer
COBOLCommon Business Oriented Language
CPSCharacters Per Second
CPUCentral Processing Unit
CRTCathods-Ray Tube
CSCWComputer Supported Cooperative Working
DNADigital Network Architecture
EBCDICExtended Binary-Coded Decimal Interchange Code
EDVACElectronic Discrete Variable Automatic Computer
EEPROMElectrically EPROM
EPROMErasable Programmable Read-Only Memory
FATFile Allocation Table
FMFrequency Modulation
FMSFile Management System
GBGiga Byte
FORTRANFormula Translation
GUIGarphical User Interface
GIGOGarbage In-Garbage-Out
HPHewlett Packard
HTMLHyper Text Markup Labguage
HTTPHyper Text Transport Protocol
I/OInput and Output
IBMInternational Business Machiness
ICIntegrated Circuit
IEEEInstitute of Electrical And Electronics Engineers
ISOInternational Standards Organization
KBKilo Bytes
LANLocal Area Network
LCDLiquid Crystal Display
WANMetropolitan Area Network
MBMega Bytes
Ms-DosMicrosoft Disk Operating System
OSOperating System
OSIOpen System Interconnection
PCPersonal Computer
PMPhase Modulation
POSPoind-Of-Sale
PROMProgrammable Read-Only Memory
RAMRandom Access Memory
RISCReduced Instruction Set Computer
ROMRead Only Memory
TDMTime-Division Multiplexing
UNIVACUniversal Automatic Computer
VANValue Added Network
VCRVideo Cassette Reorder
VSNLVidesh Sanchar Nigam Limited
WANWide Area Network
WORMWrite-Once Read Many
WYSIWYGWhat You See Is What You Get
WWWWorld Wide Web

Describe the four basic data types.

Primary data type:

  1. Integer (int)
  2. Character (char)
  3. Floating Point(float)
  4. 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?

  1. An identifier must begin with the letter and must be followed by letters and digits.
  2. The only special symbols underscore (“______”) are permitted and considered as a letter.
  3. The name of identifiers can not be any one of the reserver words or keywords.
  4. 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.

Leave a Comment