- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mandalika has Published 475 Articles
Mandalika
409 Views
The structure is a collection of different datatype variables, grouped together under a single name Syntax.Declaration and initialization of structuresThe general form of structure declaration is as follows −datatype member1; struct tagname{ datatype member2; datatype member n; };Here, struct - keyword tagname - specifies name ... Read More
Mandalika
4K+ Views
The sscanf() functionIt reads data from a character string.Syntaxsscanf(string, formatspecifier, &var1, &var2, ……..)String refers to the char string to read from.Format string refers to char string containing certain required formatting information.Var1, var2 etc., represent the individual input data items.For example, sscanf(string, "%d%d", &hours, &minutes);The sprintf() functionThis function is used to ... Read More
Mandalika
10K+ Views
This is the most general way of writing a multi-way decision.SyntaxRefer the syntax given below −if (condition1) stmt1; else if (condition2) stmt2; - - - - - - - - - - else if (condition n) stmtn; else stmt x;AlgorithmRefer the algorithm given below −START Step 1: Declare int variables. ... Read More
Mandalika
1K+ Views
If-else statement takes care of true as well as false conditions. ‘true block’ is executed, when the condition is true and ‘false block’ (or) ‘else block’ is executed, when the condition is false.SyntaxRefer the syntax given below −if (condition){ True block statement(s) }else{ False block statement(s) }Working of ... Read More
Mandalika
6K+ Views
The malloc() function stands for memory allocation, that allocate a block of memory dynamically.It reserves the memory space for a specified size and returns the null pointer, which points to the memory location.malloc() function carries garbage value. The pointer returned is of type void.The syntax for malloc() function is as ... Read More
Mandalika
3K+ Views
Expressions are evaluated by the ‘C’ compiler based on precedence and associativity rules.If an expression contains different priority operators, then the precedence rules are considered.Here, 10*2 is evaluated first since ‘*’ has more priority than ‘- ‘and ‘=’If an expression contains same priority, then associativity rules are considered i.e. left ... Read More
Mandalika
576 Views
Problem: How will the COBOL-DB2 program behave when there is a mismatch between the host variable and number of columns in the SELECT statement?SolutionIn case there is a mismatch in the number of columns and number of host variables, the query will fail. For example, if we have used the ... Read More
Mandalika
3K+ Views
Problem: What is the purpose of the "FOR UPDATE OF" clause in a cursor? What will happen if we fire an UPDATE statement without using this clause in a COBOL-DB2 program?SolutionThe “FOR UPDATE OF” clause is given in the cursor declaration and it is used when we want to update ... Read More
Mandalika
581 Views
Problem: Is it possible to update a CURSOR in which we have used JOIN on 2 tables ORDERS and TRANSACTIONS? Why or why not? How can we proceed to UPDATE any of these tables?SolutionWhenever we use JOIN in a cursor on two or more tables (ORDERS and TRANSACTIONS in this ... Read More
Mandalika
151 Views
Problem: A COBOL-DB2 program is changed to increase the length of a variable from PIC X(5) to PIC X(8). However, there are no changes in the SQL of the program. What will be the result if the program's plan/package is not binded for these changes?SolutionThe variable length change from PIC ... Read More