Giter VIP home page Giter VIP logo

c's People

Contributors

jenil2910 avatar justin-lathrop avatar mjopenglsdl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

c's Issues

login page

Develop a discussion forum for VTU students.

It should have functionalitiess such as,
Login from Stackoverflow or Quora
support for profile pictures.
An user can start a discussion, comment on others discussion,
User submitted question can be shared on quora and other popular platforms.

help me on the following c code

Hi Man

I try to figure out the difference between the "for" and "while", the following code works fine with for loop but it does not work with while loop, what is the problem?

#include <stdio.h>
#define MAXLINE 1000
int getlines(char linestr[], int limitation);
void copy(char to[], char from[]);
main()
{
int len; /* current line length /
int max; /
maximum length seen so far /
char line[MAXLINE]; /
current input line /
char longest[MAXLINE]; /
longest line saved here */

max = 0;
while( (len = getlines(line, MAXLINE)) > 0)
{
if(len > max)
{
    max = len;
    copy(longest, line);
}
}
if (max> 0) /* there was a line */
{
printf("\n%s", longest);
}
return 0;

}
int getlines(char linestr[], int limitation)
{
int i, c;

i = 0;
while((c=getchar()) != EOF && i < limitation - 1)
{
if(c == '\n')
{
    linestr[i] = c;
    ++i;
    linestr[i] = '\0';
    return i;
}
else
{
    linestr[i] = c;
    i++;
}
}

}

/*
int getlines(char linestr[], int limitation)
{
int i;
int c;

for(i=0; i < limitation - 1 && (c=getchar()) != EOF && c !='\n'; ++i)
{
linestr[i] = c;
}
if (c == '\n')
{
linestr[i] = c;
++i;
}
linestr[i] = '\0';
return i;

}
*/

void copy(char to[], char from[])
{
int i;

for(i=0; (to[i] = from[i]) != '\0'; i++)
;

}

Best Regards,
Ming

HCF & LCM

Write a program to find the HCF and LCM of the given number without using the multiplication and division.

help in C language ..

hello man can you help me in C ?
i now how to extract ANCII chars and concaternate them..
what i need to know its how can i execute that ancii string after concaternation ..

example:
1º i what to extract the string whoami from ancii chart
2º concaternate the chars to build whoami command
3º and execute the string concaternated ..

this code does allmost everything..
it extracts the chars, concaternate them ...
but it only prints the string ..
but i dont what to print ..i want to execute ..

#include <stdio.h>
#include <string.h>

  int main(void)
    {
      /* variable declarations */
      char a = 119;  /* ancii character w */
      char b = 104;  /* ancii character h */
      char c = 111;  /* ancii character o */
      char d = 97;   /* ancii character a */
      char e = 109;  /* ancii character m */
      char f = 105;  /* ancii character i */
 
      /* concaternate and transform decimal values to ancii chars using putchar */
      //char command = putchar('a');putchar('b');putchar('c');putchar('d');putchar('e');putchar('f');

      /* execute command using system() */
      int system(char command);
        system(command);
    }

Hi, dude.

in your queue.c

your pop function is not O(1) complexity of time.

your vpn code is too hard for me .lol

Pattern

​#​include​ ​<​stdio.h​>

​/*
​ * @author jelathro
​ * @Date 2/19/13
​ * 
​ * Provide various examples of pointers 
​ * and how pointers work.
​ ​*/
​int​ ​main​(​void​){
​    ​//​ Basic pointers and Basic addresses
​    ​int​ *basic_pointer;
​    ​int​ basic_value;

​    ​//​ Give value a literal value
​    basic_value = ​'​A​'​;
​    ​//​ Assign pointer to address
​    ​//​ of literal value in value
​    basic_pointer = &basic_value;

​    ​printf​(​"​pointer is at address ​%p​\n​"​, &basic_pointer);
​    ​printf​(​"​value at address of pointer is ​%c​\n\n​"​, *basic_pointer);

​    ​//​ More advanced use of pointers
​    ​//​ Array's are just fancy pointers
​    ​char​ array[​5​] = {​'​a​'​, ​'​A​'​, ​'​b​'​, ​'​z​'​, ​'​M​'​};
​    ​char​ *same_array = array;
​    ​char​ **fancy_same_array = &same_array;

​    ​printf​(​"​array[3] = ​%c​, addr = ​%p​\n​"​, array[​3​], &array[​3​]);
​    ​printf​(​"​same_array[3] = ​%c​, addr = ​%p​\n​"​, same_array[​3​], &same_array[​3​]);
​    ​printf​(​"​**fancy_same_array[3] = ​%c​, addr = ​%p​\n​"​, (*fancy_same_array)[​3​], &(*fancy_same_array)[​3​]);

​    ​//​ char arrays are also just a "string"
​    ​//​ of characters.
​    ​printf​(​"​array string ​%s​, addr = ​%p​\n​"​, array, &array);
​    ​printf​(​"​same array string ​%s​, addr = ​%p​\n​"​, same_array, &same_array);
​    ​printf​(​"​fancy array string ​%s​, addr = ​%p​\n\n​"​, (*fancy_same_array), &(*fancy_same_array));

​    ​//​ Arrays of pointers
​    ​char​ *ptr_array[​2​];
​    ​char​ *ptr1 = ​NULL​, *ptr2 = ​NULL​;
​    ​char​ char_elements[​2​] = {​'​H​'​, ​'​i​'​};

​    ptr1 = &char_elements[​1​];
​    ptr2 = char_elements;

​    ptr_array[​0​] = ptr2;
​    ptr_array[​1​] = ptr1;
​    
​    ​printf​(​"​**ptr_array = ​%c​\n​"​, **ptr_array);
​    ​printf​(​"​addr at **ptr_array = ​%p​\n​"​, &(**ptr_array));
​    ​printf​(​"​addr at **ptr_array[0] = ​%p​\n\n​"​, &(ptr_array[​0​]));
​    
​    ​printf​(​"​
ptr_array[1] = ​%c​\n​"​, *ptr_array[​1​]);
​    ​printf​(​"​addr at *ptr_array[0] = ​%p​\n​"​, &(**ptr_array));
​    ​printf​(​"​addr at *ptr_array[0] = ​%p​\n​"​, &(**ptr_array));
​    ​printf​(​"​addr at *ptr_array[1] = ​%p​\n​"​, &(*ptr_array[​1​]));

​    ​return​ ​0​;
​}

Memory allocation

  • In the Hashtable module, most memory allocation doesn't check if the allocation was successful.
    it rather assumes a success, as such can lead to runtime errors, where a pointer to a structure will
    try to reference a structure member which doesn't exists. (this is same for all calls to 'malloc' and
    'calloc' in the the other modules like those of Queues...)

C program simple

#include<stdio.h>
#include<conio.h>
int main()
{
printf(" enter your name");
return 0;
}

C programming

int address=0124;
printf("%d",address);
Output=124
Why it ain't output 0 with all of those number?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.