
Search In
Finding largest number in an array:
To find largest number in an array first user will enter the length for the array and then the user will input the elements for the array. There is a max variable taken in the program which is assigned 0th index
#include<string.h>
int main() {
int number1, number2;
char str[10];
printf("\nEnter a Number:::");
scanf("%d", &number1);
sprintf(str, "%d", number1);//step 1
strrev(str);//step 2
number2 = atoi(str);//step 3
pri
Using library function:
We can use toupper() library function present in "string.h" to convert string into uppercase.
#include <stdio.h>
#include <string.h>
int main()
{
char str[100];
printf("Enter a string to convert it to Upp
Program to find length of a string without string.h and loop in C?
#include <stdio.h>
int main()
{
char s100];
printf( "\rLength is: %d", printf("Entered string is: %s\n", gets(s)) - 20);
return 0;
}
output:
Entered string
For storing errors there are many ways that can be done . Some store it in the database some store it in the TextFile
So for storing error in the Text File is given here.
First we will create a Logger.cs class into our project
Hello Readers,
In this blog, I am going to tell a small difference between Explode & Split function in PHP. Both the function do the same thing i.e split a string into array.
But there is a minor difference that explode takes delimiter
Type casting is to change the data type of a variable according to programming need.
Type casting is done to assign values to dissimilar data type or to perform manipulation over dissimilar data type.
Type ca
Client and server communication is done with two commonly used http method
1.GET
2.POST
GET- GET is basically used for getting the data from the server sometime cached.
The $.get method is used in jQuery to get the data.
$.get(URL,callback);
u
Namespace
In C++ two variables with the same name are not possible in the same scope i.e a name given to specific type or function represent one entity in a particluar scope but with namespaces, there is a possibility to create two variables or memb
Synchronized block:
Synchronized block is mainly used when there is a sharing of resources and it is used to lock an object for any shared resource so that at a particular time only one object can use that resource. By using synchronized block only