Make coding your habit. Learn coding with us and make it your passion. Many programs, different languages, ask questions, have your answer and learn easily how to code in each language.
Find Days and Months
Get link
Facebook
X
Pinterest
Email
Other Apps
-
C program to find the number of days and months on the basis of given input
In this post, I shared a C program to find the total number of months and the remaining days on the basis of the given input from the user.
#include <stdio.h>
#include <conio.h>
void main()
{
int day,month,day1;
printf("enter the number of days:\n");
scanf("%d",&day);
month=day/30;
day1=day%30;
printf(“month is =%d”,month);
printf(:days are =%d,day1);
getch();
}
Easiest Way to Implement Multi Selection of Item in Recycler View Hello friends, in this blog post I am going to show you that how one can make a multi selection functionality for items in the Recycler View So lets get started. First add the following dependencies to your project: dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' //Recycler View Dependency implementation 'androidx.recyclerview:recyclerview-selection:1.0.0' } Now in this project we have two XML layout file: For Main...
C program for "Call By Value" The call by value method of passing arguments to a function copies the actual value of an argument into the formal parameter of the function. In this case, changes made to the parameter inside the function have no effect on the argument.
DFS v/s BFS Depth First Search Depth First Search for a graph is similar to Depth First Traversal of a tree . The only catch here is, unlike trees, graphs may contain cycles, so we may come to the same node again. To avoid processing a node more than once, we use a boolean visited array. Pseudocode: Input : A graph G and a vertex v of G Output : All vertices reachable from v labeled as discovered A recursive implementation of DFS:
Comments
Post a Comment