1.What is Structure ? Structure is the collection of variables of different types under a single name for better handling. For example: You want to store the information about person about his/her name, citizenship number and salary. You can create … Continue reading
#include<stdio.h> int main() { int a,b; printf(“Enter the value of a:”); scanf(“%d”,&a); printf(“Enter the value of b:”); scanf(“%d”,&b); a=a+b; b=a-b; a=a-b; printf(“%d”,a); printf(“%d”,b); return 0; }
//HCF and LCM of two nos. #include int main() { int a,b,num1,num2,deno,nume,rem=1,lcm; printf(“\nEnter two nos: “); scanf(“%d %d”,&a,&b); if(a>b) { num1=a; num2=b; } else { num1=b; num2=a; } nume=num1; deno=num2; while(rem!=0) { rem=nume%deno; nume=deno; deno=rem; } printf(“\nHCF: %d “,nume); lcm=(num1*num2)/nume; … Continue reading
What do we mean by data alignment, structure packing and padding? Predict the output of following program. #include <stdio.h> // Alignment requirements // (typical 32 bit machine) // char 1 byte // short int 2 … Continue reading
head 1.47; access; symbols; locks root:1.47; strict; comment @ * @; 1.47 date 2014.06.08.07.52.37; author root; state Exp; branches; next 1.46; 1.46 date 2014.06.07.16.31.29; author root; state Exp; branches; next 1.45; 1.45 date 2014.06.07.16.21.15; author root; state Exp; branches 1.45.1.1; … Continue reading
Sometimes a target does not mean a file but it might represent an action to be performed. When a target is not related to a file it is called phony target. For instance: getobj: mv obj/*.o . 2>/dev/null getobj target move … Continue reading
1>> *s++ and *(s++) OR *s– and *(s–) both behaves in the same manner.prints the same value. 2>> ++*s means value print the the incremented value at pointer s.
A make file consists of a set of targets, dependencies and rules. A target most of time is a file to be created/updated. target depends upon a set of source files or even others targets described in Dependency List. Rules … Continue reading
1. Declaration can be done any number of times but definition only once. 2. “extern” keyword is used to extend the visibility of variables/functions(). 3. Since functions are visible through out the program by default. The use of extern is … Continue reading
Logically linked list is a linear data structure because each node has a link to its next one. but physically it is not necessarily true because memory allocation to nodes may or may not be sequential..
The representation of a particular data structure in the memory of a computer is called a storage structure whereas a storage structure representation in auxiliary memory is often called a file structure.
null array—-when the size of array is not declared than the array is known as null array. EMPTY ARRAY——-if an array having the size but not values than it’s known as empty array. EX = null array b[]; empty array … Continue reading
The lseek() function repositions the offset of the file descriptor fildes to the argument offset according to the directive whence. The argument fildes must be an open file descriptor. Lseek() repositions the file position pointer associated with the file descriptor … Continue reading