PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Other / Miscellaneous/Confluent

Explain variadic functions

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of variadic functions, including language-specific syntax and calling conventions, type-safety mechanisms, performance and memory implications, argument forwarding, and API design for a typesafe variadic logger.

  • hard
  • Confluent
  • Other / Miscellaneous
  • Software Engineer

Explain variadic functions

Company: Confluent

Role: Software Engineer

Category: Other / Miscellaneous

Difficulty: hard

Interview Round: Technical Screen

Explain what variadic functions are and how they are supported in two languages of your choice (e.g., C/C++, Go, Java, Python). Cover calling conventions and how arguments are accessed by the callee, type-safety mechanisms (e.g., templates/generics vs. raw varargs), performance and stack/heap implications, and how to forward variadic arguments to another function. Implement a typesafe variadic logger that accepts key–value pairs and formats them efficiently; discuss pitfalls such as format-string vulnerabilities, boxing/reflection overhead, and ambiguity resolution. Provide tests and analyze complexity.

Quick Answer: This question evaluates understanding of variadic functions, including language-specific syntax and calling conventions, type-safety mechanisms, performance and memory implications, argument forwarding, and API design for a typesafe variadic logger.

Confluent logo
Confluent
Jul 27, 2025, 12:00 AM
Software Engineer
Technical Screen
Other / Miscellaneous
5
0

Variadic Functions in Two Languages + Typesafe Variadic Logger

Context

Variadic functions accept a variable number of arguments. In systems and backend engineering, they appear in logging, formatting, and convenience APIs. This exercise asks you to compare how two languages support variadic functions and to implement an efficient, typesafe variadic logger that accepts key–value pairs.

Tasks

  1. Choose two languages (e.g., C/C++, Go, Java, Python). For each language, explain:
    • What variadic functions are and the language syntax.
    • Calling conventions and how the callee accesses arguments.
    • Type-safety mechanisms (e.g., templates/generics vs raw varargs).
    • Performance and memory (stack/heap) implications.
    • How to forward variadic arguments to another function.
  2. Implement a typesafe variadic logger that accepts key–value pairs and formats them efficiently.
    • Avoid format-string vulnerabilities and unnecessary boxing/reflection.
    • Provide a clean API for callers.
    • Show how to forward variadic arguments.
  3. Discuss pitfalls, including:
    • Format-string vulnerabilities.
    • Boxing/reflection overhead.
    • Ambiguity resolution in overloads/dispatch.
  4. Provide tests and analyze time/space complexity.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Other / Miscellaneous•More Confluent•More Software Engineer•Confluent Software Engineer•Confluent Other / Miscellaneous•Software Engineer Other / Miscellaneous
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.