![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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
Bhanu Priya has Published 1581 Articles
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
143 Views
ProblemHow to identify a total number of upper-case alphabets in a string using C Programming?SolutionThe logic we used to count number of upper-case letters in a sentence is as follows −for(a=string[0];a!='\0';i++){ a=string[i]; if (isupper(a)){ counter=counter+1; //counter++; } }Example 1 Live Demo#include #include ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
525 Views
ProblemWrite a C program to display and add the elements using dynamic memory allocation functions.SolutionIn C, the library function malloc allocates a block of memory in bytes at runtime. It returns a void pointer, which points to the base address of allocated memory and it leaves the memory uninitialized.Syntaxvoid *malloc ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
383 Views
The atexit() is a function that allows the user to register a function that has to be called based on program termination.It is a predefined function that is included in stdlib header files.Example 1 Live Demo#include #include void welcome(void){ printf("Welcome to New, "); } void world(void){ printf("World"); } int ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
17K+ Views
ProblemWrite a C program for storing the details of 5 students into a file and print the same using fread() and fwrite()SolutionThe fread() function reads the entire record at a time.Syntaxfread( & structure variable, size of (structure variable), no of records, file pointer);Examplestruct emp{ int eno; char ename ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
684 Views
ProblemWrite a C program to concatenate n characters from source string to destination string using strncat library functionSolutionThe strcat functionThis function is used for combining or concatenating two strings.The length of the destination string must be greater than the source string.The resultant concatenated string will be in the source string.Syntaxstrcat ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
3K+ Views
Strncmp is a predefined library function present in string.h file, it used to compare two strings and display which string is greater.The strcmp fucntion (String comparison)This function compares 2 strings. It returns the ASCII difference of the first two non– matching characters in both the strings.Syntaxint strcmp (string1, string2);If the ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
15K+ Views
ProblemHow to read a series of items that are present in a file and display the data in columns or tabular form using C ProgrammingSolutionCreate a file in write mode and write some series of information in the file and close it again open and display the series of data ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
205 Views
Open a file in reading mode. If the file exists, then write a code to count the number of lines in a file. If the file does not exist, it displays an error that the file is not there.The file is a collection of records (or) It is a place ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
956 Views
A pointer is a variable that stores the address of another variable.Features of PointersPointer saves the memory space.The execution time of a pointer is faster because of direct access to memory location.With the help of pointers, the memory is accessed efficiently, i.e., memory is allocated and deallocated dynamically.Pointers are used ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
742 Views
ProblemWrite a C program to define the structure and display the size and offsets of member variablesStructure − It is a collection of different datatype variables, grouped together under a single name.General form of structure declarationdatatype member1; struct tagname{ datatype member2; datatype member n; };Here, struct - keywordtagname ... Read More