Jump to content
Killersites Forums

SubhanUllah

Member
  • Posts

    132
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Contact Methods

  • Website
    https://www.virtuenetz.com/

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

SubhanUllah's Achievements

Community Regular

Community Regular (8/14)

  • Reacting Well Rare
  • One Month Later Rare
  • Dedicated Rare
  • Week One Done Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. import datetime While True: my_now = datetime.datetime.now().strftime("%d.%b %Y %H:%M:%S") myfile = open("my_file.txt", "a") myfile.write("Added at {my_now}") myfile.close() sleep (100)
  2. #include <stdio.h> int main(){ for(int i = 0x20; i<0x30; i++){ printf("%d ", i); printf("%c\n", i); } }
  3. int a = 6; int b = 2; std::cout << "a=" << a << " b=" << b << "\n"; int temp = a; a = b; b = temp; std::cout << "a=" << a << " b=" << b << "\n";
  4. #include <stdio.h> #include <time.h> int main(){ time_t ct; // current time struct tm *lt; // local time ct = time(NULL); lt = localtime(&ct); printf("%s\n", asctime(lt)); }
  5. #include "../x11.c" int main(){ xopen(0,0,"box"); xclear_color(ORN); xcolor(BLU); xrectangle(44,44,200,100,0); xgetc(); xclose(); }
  6. typedef struct { int x; int y; } point_t; point_t some_func(void) { point_t pt; pt.x = 0; pt.y = 0; return pt; }
  7. Yes if (someValue == someOtherValue) { someFunction(); }
  8. The floatval() function return the float value of the variable passed to it. For example: $integer = 123; $float = floatval($integer); var_dump($integer); // int(123) var_dump($float); // float(123)
  9. Here is the example: void foo(void) { printf(“foo was called\n”); } if you do this: foo(); then you’re calling do by name. If you do: void (*func_ptr)(void) = foo; func_ptr(); Then you’re calling foo through function pointer func_ptr().
  10. void f(int i) { i = i + 1; } void g(int &i) { i = i + 1; } int main() { int i = 1; f(i); // by value: i is still 1 g(i); // by reference: i is now 2 return 0; }
  11. int x[] = {1,2,3,4}; void print(int *arr, size_t n) { for (size_t i = 0; i < n; i++) { printf(“%d\n”); } } print(x, 4);
  12. #include <stdio.h> int main() { for (int a=20;a>=10;--a){ // Write C code here printf("Hello world"); } return 0; }
  13. int x[] = {1, 2, 3, 4}; You could also use a length: int x[4] = {1, 2, 3, 4};
  14. int x[] = {1, 2, 3, 4}; You could also use a length: int x[4] = {1, 2, 3, 4};
×
×
  • Create New...