Posts

Showing posts from September, 2024

Try it in C Language

  Write a C program to swap two variables without using a third variable. This is one of the very common C interview questions. It can be solved in a total of five steps. For this, I have considered two variables as a and b, such that a = 5 and b = 10. #include<stdio.h> int main(){ int a=5,b=10; a=b+a; b=a-b; a=a-b; printf("a= %d b= %d",a,b); a=5; b=10; a=a+b-(b=a); printf("\na= %d b= %d",a,b); a=5; b=10; a=a^b; b=a^b; a=b^a; printf("\na= %d b= %d",a,b); a=5; b=10; a=b-~a-1; b=a+~b+1; a=a+~b+1; printf("\na= %d b= %d",a,b); a=5, b=10; a=b+a,b=a-b,a=a-b; printf("\na= %d b= %d",a,b); return 0; } 2) What is Pointer? int main() { int x=10; int far *ptr; ptr=&x; printf("%d",sizeof ptr); return 0; } 3) struct ABC{ int a; float b; char c; }; int main() { struct ABC ...

31 - One liner question and answer for technical interview

  Q1. What is the Definition of a DBMS? A  Database Management System  (DBMS) is a computer program that controls the creation, maintenance, and use of databases. It functions as an interface between user applications and data stored in files or on other computers connected to it over network links. Q2. What does RDBMS stand for? RDBMS , or Relational Database Management System, is a system that stores data in collections of tables related by common fields between columns. It also enables operators to manipulate the stored information within those tables. Q3. What language is used to communicate with the Database? SQL stands for Structured Query Language, and it is a standard computer language that allows users to send commands or query statements in order to retrieve stored data from relational databases and manipulate them as needed. Q4. Explain what a database contains? A database typically consists of an organized collection of records that can be queried by one or mo...