C rewind() function in Language
Categories: C language ||
The rewind() function sets the file pointer at the beginning of the stream. It is useful if you have to use stream many times.Syntax:void rewind(FILE *stream) Example:File: file.txtthis is
Categories: C language ||
The rewind() function sets the file pointer at the beginning of the stream. It is useful if you have to use stream many times.Syntax:void rewind(FILE *stream) Example:File: file.txtthis is
Categories: C language ||
The fseek() function is used to set the file pointer to the specified offset. It is used to write data into file at desired location.Syntax:int fseek(FILE *stream, long int offset, int whence) &n
Categories: C language ||
The fputs() and fgets() in C programming are used to write and read string from stream. Let's see examples of writing and reading file using fgets() and fgets() functions.Writing File : fputs() functi
Categories: C language ||
Writing File : fputc() functionThe fputc() function is used to write a single character into file. It outputs a character to a stream.Syntax:int fputc(int c, FILE *stream) Example:#include
Categories: C language ||
Writing File : fprintf() functionThe fprintf() function is used to write set of characters into file. It sends formatted output to a stream.Syntax:int fprintf(FILE *stream, const char *format [, argum
Categories: C language ||
In programming, we may require some specific input data to be generated several numbers of times. Sometimes, it is not enough to only display the data on the console. The data to be displayed may be v
Categories: C language ||
The size of the union is based on the size of the largest member of the union.union abc{ int a; char b; float c; double d; }; int main
Categories: C language ||
Union can be defined as a user-defined data type which is a collection of different variables of different data types in the same memory location. The union can also be defined as many members, but on
Categories: C language ||
#include <stdio.h> struct student { char a; int b; char c; }; int main()
Categories: C language ||
struct student { char a; // 1 byte char b; // 1 byte int c; // 4 bytes } If we have a 32-bit processor (4 bytes
Categories: C language ||
Structure padding is a concept in C that adds the one or more empty bytes between the memory addresses to align the data in memory. Let's first understand the structure padding in C through a simple s
Categories: Angular || Angular JS || MCQ ||
AngularJS MCQ Quiz Questions with Answer 1) Which of the following is true about the currency filter? A currency filter is used to format the text in a currency format. A currency
Categories: Angular || Angular JS || MCQ ||
AngularJS MCQ Quiz Questions with Answer 1) Which of the following statement is correct for AngularJS? AngularJS is an HTML framework AngularJS is a Java framework AngularJS
Categories: Angular || Angular JS || MCQ ||
AngularJS MCQ Quiz Questions with Answer Part 2 1) Which of the following syntax is used to create a module in AngularJS? var myModule= angular.module(); var myModule= new Module();
Categories: C language ||
Just like other variables, a structure can also be passed to a function. We may pass the structure members into the function or pass the structure variable at once. Consider the following example to p
Categories: C language ||
1) Separate structureHere, we create two structures, but the dependent structure should be used inside the main structure as a member. Consider the following example.struct Date { &nbs
Categories: C language ||
C provides us the feature of nesting one structure within another structure by using which, complex data types are created. For example, we may need to store the address of an entity employee in a str
Categories: C language ||
Why use an array of structures?Consider a case, where we need to store the data of 5 students. We can store it by using the structure as given below.#include<stdio.h> struct student&n
Categories: C language ||
The typedef is a keyword used in C programming to provide some meaningful names to the already existing variable in the C program. It behaves similarly as we define the alias for the commands. In shor
Categories: C language ||
Structure in c is a user-defined data type that enables us to store the collection of different data types. Each element of a structure is called a member. Structures ca; simulate the use of classes a
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 Business Studies Business Finance and Marketing Q1: Explain the importance of consumer protection from the point of view of a business. Answer: Consu
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 Business Studies Business Finance and Marketing Q1: Explain the importance of consumer protection from the point of view of a business. Answer: Consum
Categories: C language ||
Why use structure?In C, there are cases where we need to store multiple attributes of an entity. It is not necessary that an entity has all the information of one type only. It can have different attr
Categories: C language ||
C Programming allows us to perform mathematical operations through the functions defined in <math.h> header file. The <math.h> header file contains various methods for performing mathemati
Categories: C language ||
There are many important string functions defined in "string.h" library.No.FunctionDescription1)strlen(string_name)returns the length of string name.2)strcpy(destination, source)copies the contents of
Categories: C language ||
The gets() and puts() are declared in the header file stdio.h. Both the functions are involved in the input/output operations of the strings.C gets() functionThe gets() function enables the user to en
Categories: C language ||
We have used pointers with the array, functions, and primitive data types so far. However, pointers can be used to point to the strings. There are various advantages of using pointers to point strings
Categories: C language ||
Till now, we have used scanf to accept the input from the user. However, it can also be used in the case of strings but with a different scenario. Consider the below code which stores the string while
Categories: C language ||
Traversing the string is one of the most important aspects in any of the programming languages. We may need to manipulate a very large text which can be done by traversing the text. Traversing string
Categories: C language ||
The string can be defined as the one-dimensional array of characters terminated by a null ('\0'). The character array or the string is used to manipulate text such as word or sentences. Each character
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 English Third level Q1. What does the third level refer to? Answer: The third level refers to the subway of the Grand Central Station that takes pass
Categories: C language ||
The concept of dynamic memory allocation in c language enables the C programmer to allocate memory at runtime. Dynamic memory allocation in c language is possible by 4 functions of stdlib.h header fil
Categories: C language ||
Till now, we have seen that in C programming, we can pass the variables as an argument to a function. We cannot pass the function as an argument to another function. But we can pass the reference of a
Categories: C language ||
As we know that we can create a pointer of any data type such as int, char, float, we can also create a pointer pointing to a function. The code of a function always resides in memory, which means tha
Categories: C language ||
A Null Pointer is a pointer that does not point to any memory location. It stores the base address of the segment. The null pointer basically stores the Null value while void is the type of the pointe
Categories: C language ||
As we already know that "what is a pointer", a pointer is a variable that stores the address of another variable. The dereference operator is also known as an indirection operator, which is represente
Categories: C language ||
1. The malloc() and calloc() function return the void pointer, so these functions can be used to allocate the memory of any data type.2. The void pointer in C can also be used to implement the generic
Categories: C language ||
Till now, we have studied that the address assigned to a pointer should be of the same type as specified in the pointer declaration. For example, if we declare the int pointer, then this int pointer c
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 English Indigo (set 2) Q1: How was Gandhi able to influence lawyers? Give instances. Answer: Gandhi was able to influence the lawyers through h
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 English Indigo Q1: Why is Rajkumar Shukla described as being 'resolute'? Answer: Rajkumar Shukla is described as being 'resolute'
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 EnglishThe Rattrap Q1: What made the peddler accept Edla Willmansson's invitation? Answer: By his frightened look, Edla guessed that the peddler had e
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 English The Rattrap Q1: From where did the peddler get the idea of the world being a rattrap? Answer: During one of his usual plodding, the peddler t
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 EnglishDeep Water Q1: What is the "misadventure" that William Douglas speaks about? Answer: Douglas refers to the incident at the Y.M.C.A. swimming pool whe
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 English (Part - 2) Lost Spring Q1: Mention the hazards of working in the glass bangles industry. Answer: The impoverished workers in the glass bangles indust
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 English Lost Spring Q1: What is Saheb looking for in the garbage dumps? Where is he and where has he come from? Answer: Saheb is looking for coins, r
Categories: NCERT Solutions || Intermediate class ||
NCERT Solutions for Class 12 English Flamingo The Last Lesson Class Q1: What was Franz expected to be prepared with for school that day? Answer: That day, Franz was expected to be prep
Categories: Freshers || NCERT Solutions ||
NCERT Solutions for Class 12 English Flamingo Aunt Jennifer's Tigers Q1: What does the title of the poem suggest to you? Are you reminded of other poems on tigers? Answer: The tit
Categories: C language ||
A pointer to constant is a pointer through which the value of the variable that the pointer points cannot be changed. The address of these pointers can be changed, but the value of the variable that t
Categories: C language ||
Constant PointersA constant pointer in C cannot change the address of the variable to which it is pointing, i.e., the address will remain constant. Therefore, we can say that if a constant pointer is
Categories: C language ||
The sizeof() operator is commonly used in C. It determines the size of the expression or the data type specified in the number of char-sized storage units. The sizeof() operator contains a single oper