Posts

Showing posts from August, 2026

AEx5

 Take an example subnet of hosts. Obtain broadcast tree for THE SUBNET. #include<stdio.h> #include<stdlib.h> #define MAX_NODES 20 #define INFINITY 1000 void run_prim(int i,int num_nodes,int *hops); int dist[MAX_NODES][MAX_NODES]; int path[MAX_NODES][MAX_NODES]; int main() {  int num_nodes=0;  int i=0,j=0;  int path_len,hops[MAX_NODES];  printf("enter the number of nodes:");  scanf("%d",&num_nodes);  fflush(stdin);  printf("enter the connection matrix, 0 if not connected\n");  printf("otherwise,the distance\n");  for(;i<num_nodes;i++)  { printf("enter the distances for node num:%d\n",i);   for(j=0;j<num_nodes;j++)   {    if(i==j)    {     dist[i][j]=0;     continue;    }    printf("distance from %d to %d= ",i,j);    scanf("%d",&dist[i][j]);    fflush(stdin);    if(dist[i][j]==0)      dist[i][j]=...

AEx4

 Implement Dijkstra‘s algorithm to compute the Shortest path through a NETWORK. #include<stdio.h> #include<stdlib.h> #define MAX_NODES 1024 #define INFINITY 1000 int n=8,cost=0,dist[8][8]={{0,2,0,0,0,0,6,0},    {2,0,7,0,2,0,0,0},    {0,7,0,3,0,3,0,0},                  {0,0,3,0,0,0,0,2},                  {0,2,0,0,0,2,1,0},                  {0,0,3,0,2,0,0,2},                  {6,0,0,0,1,0,0,4},                  {0,0,0,2,0,2,4,0}}; int shortest_dist(int s,int t,int path[]) {  int i,k,min; struct state  {   int pre;   int length;   int label;  }state[1024];  struct state *p;  for(p=&state[0];p<&state[n];p++)  {   p->pre=-1;   p->length=INFINITY;   p->la...

Privacy Policy

  Privacy Policy Effective Date: August 12, 2026 This Privacy Policy explains how "its crazy" handles user information. 1. Information Collection "its crazy" does not collect, store, or share any personally identifiable information from users. The app does not require users to create an account or provide personal information such as their name, email address, phone number, or location. 2. Device Permissions The app may request permissions that are necessary for its features to function. These permissions are used only for the purposes described within the app and are not used to collect personal information. 3. Data Storage The app does not send personal information to external servers. Any data created or used by the app remains on the user's device unless explicitly stated otherwise. 4. Third-Party Services The app does not use third-party services to collect or process users' personal information. 5. Children's Privacy The app does not knowingly coll...

Flut 2b

2b). Implement different layout structures using Row, Column and Stack widgets. Row Widget: It is used to display widgets in a single horizontal line, allowing for easy alignment, spacing and flexible layouts. It is one of the fundamental layout widgets in flutter, allowing you to align multiple widgets horizontally. Row widget does not allow scrolling . It automatically sizes its children based on their content and aligns them along the main axis. Code: import 'package:flutter/material.dart'; void main(){   runApp(MyApp()); } class MyApp extends StatelessWidget{   Widget build(BuildContext context){     return MaterialApp(       title: 'Row Widget Example',       home: Scaffold(         appBar: AppBar(           title: Text('Row Widget Demo'),         ),         body:Center(           child: Container(       ...

Flut 2

 2. Explore various flutter widgets(Text,Image,and  container) TEXT WIDGET:The Text widget in Flutter is used to  display a string of text on the screen.It is highly  customizable, allowing you to style and format text to suit  your design needs.  import 'package:flutter/material.dart'; void main() {  runApp(MyApp()); } class MyApp extends StatelessWidget {  // This widget is the root of your application.  @override  Widget build(BuildContext context) {  return MaterialApp(  home: Scaffold(  backgroundColor: Colors.orange,  appBar: AppBar(  backgroundColor: Colors.green,  title: Text("Text Widget"),  ),  body: Center(  child: Text(  "A long text with multiple styles and properties in  flutter!",  style: TextStyle( fontSize: 20.0,  fontWeight: FontWeight.bold,  fontStyle: FontStyle.italic,  letterSpacing: 1.5,  wordSpacing: 4.0,  color: Colors.blue, ...