Archives Answers

Answer

Explain while loop with example.

The while loop in C is a control flow statement that repeatedly executes a block of code as long as a specified condition is true. It has the following syntax: Here’s an explanation of how the while loop works: Condition Evaluation: The loop starts…

What are the tokens of c language explain with example

Tokens in C language are the smallest individual units of a program, such as keywords, identifiers, constants, operators, and special symbols. Here’s an explanation of each type of token with examples: Keywords: Keywords are reserved words that have predefined meanings…

Distinguish between structure and union.

Feature Structure Union Definition A structure is a user-defined data type that groups related data items under a single name. A union is a user-defined data type similar to a structure, but it uses the same memory location for storing…

What are strings and give any four string related functions.

String Handling in C Strings in C are represented as one-dimensional arrays of characters terminated by a null character ('\0'). Various functions in the <string.h> header facilitate string manipulation, including finding the length, copying, comparing, and concatenating strings. 1. strlen()…

What are bitwise and logical operators in C ?

Bitwise Operators Bitwise operators perform operations on individual bits, and the result is also always a bit. They can work with integral numeric types. There are six bitwise operators: 1. `~` – Complement 2. `&` – AND 3. `|` –…